Posting this because I've only recently put all of the puzzle pieces together - particularly depots. Is there a simpler way to get trains to route properly in vanilla?
Name all of your loading/unloading stations the same, e.g. [L] Iron, [U] Coal.
Use circuit logic at each station to disable it if either enough items are available/needed to call a train, or a train is stopped at the station. Do this at both loading and unloading stations.
To prevent trains from stopping mid-route when all of their destinations are disabled, build a depot using dummy stations and pathfinding hackery. It looks something like this. One exit is a dead-end with a dummy station for every normal station on the network. The dummy stations are always enabled but there's a series of signals before the stations that are wired to always be red. Use as many signals as you can fit. Each of the signals adds 1000 to the estimated distance, so trains should only try to path to a dummy station if all other options are disabled. The train will sit in the depot until a non-dummy station is enabled, repath after a few seconds, and then leave.