TL:DRAdd LTN-like functionality that limits the number of trains that can have a particular station (out of many with the same name) as a destination.
Add some more signals for trains and stations so players can implement the limit themselves.
WhatThe easiest (for a player, I mean) way would be to have a configurable signal limit how many trains can have this particular station out of many with the same name as their current destination, so first N trains will go to this station, but for others it's effectively disabled and the station gets re-enabled for them only when the train leaves the station or some of the trains that had locked it's place in a queue decided to repath to some other station with the same name.
PROS: Very easy for the player.
CONS: Some may say it's too OP: effectively you make many vanila train control circuits obsolete, but the player still needs to dispatch trains only when there is demand.
Another, idea that is more difficult to implement (both for the player and for the developers):
1) Each station can provide a signal how much trains have it as their current destination
2) When leaving the current station train provide for a couple of ticks it's destination id signal through the current station. Player checks this signal, checks how many trains is the destination awaiting already, and send a signal to the train to wait more or proceed. If the train gets "wait signal", it tries to recalculate it's path to another station with the needed name once every N seconds.
3) Player should have some checkbox in a train schedule GUI that enables/disables choosing another destination when already on route.
PROS: Probably not-so OP as it needs more circuitry/knowledge
CONS: Worst-case scenario: you need a new wire signal for each station for providing incoming trains count, and there is a limited number of wire signals. Not clear what signal should the train provide as a destination station ID (probably it can be the same signal as a station uses). More things to implement. Doesn't sound very intuitive for a new player.
WhyDesigning rail systems is one of the most interesting part of the game for me, and I really like playing with LTN mod. I know there are some vanila-train circuit networks with similar goals, when you have N stations with the same name providing materials, and a train can go to whatever station is open, but to my knowledge all of those have some problem with a situation when, say, you have 16 trains for delivering green circuits, waiting in the depot, and then one station can provide them, and suddenly all 16 trains decide to go to this station.
HTN, as far as I know, has something like this: if there is one train load available at any of the provider stations, allow only one train to exit depot, 5 loads - 5 trains will be dispatched, but even if these 5 loads are distributed over 5 provider stations all 5 trains will go to the nearest station at first and only when the first train arrives, signal-controlled rail signals will go red severely penalizing paths through this station 4 trains will go to the next provider.
As you can imagine, it makes designing stackers difficult when you don't know how many trains can arrive at the station. Worst-case scenario - all of them, which is OK if there are 2-3 trains for this product and very inconvenient if there are 16 trains.
LTN has a special signal that limits the maximum number of trains that can be sent to a particular station, therefore you can design stackers much easier.
To my knowledge you can't really implement this functionality in Vanila (at least in a useable way) because you don't have enough information: you can't read which train station out of many with the same name is train has as it's destination, you don't know how many trains already have any particular station as a destination, etc.