I did some more thinking on this.
When a train should enter a block but can't, push it onto a FIFO associated with the block. When the block empties, pull a train from the FIFO and let only it in.
Adding a generic behavior to do this is actually very complicated, especially to make it reliable, intuitive, and more useful than the system we have now.
What if the block has more than one exit, and the first train in the queue wants to go to a blocked exit while the second train in the queue wants to go to an open exit? The game has to go down the list every tick to see the highest-priority train that can move.
What if there is more than one block between the stacker and the station, and more than one train trying to use both blocks? Is there a separate queue for each block, and each train is added to both queues?
What if the block has more than one exit and a train could use either exit to get to a valid destination, but both are blocked? Is the train added to all possible queues, then removed from the extras when it travels one of them?
In either of those cases, what if two trains are vying for the same pair of blocks, and somehow end up in opposite orders in the two queues? Each will be stuck in second place for one of the two blocks, and neither gets to go.
And what if the game automatically enables the FIFO functionality only for blocks with a single exit? How does the behavior change enough to be noticeable, and how would the player know it was active?
The current system handles all of these cases better than the FIFO system would. Whichever train has a free path goes, and there's no complicated logic in the priority because there is *no* logic in the priority. Not "smart", but easy to understand. In fact, the only case where the FIFO behavior is more intuitively predictable is the simple stacker.
-------------------------
The specific goal of a FIFO stacker can be accomplished with circuits and rail signals, assuming all exits are treated alike. It becomes much harder if there is a communal stacker for multiple stations, and certain trains only want to go to certain stations. I thought about adding a signal with a mod that could be used on the output of a stacker to enforce FIFO behavior in more complicated cases, but it basically requires closable chain signals to keep from blocking a new train to station A with an old train waiting for Station B. The devs have said even a minor change like closable chain signals would require a massive rewrite of the pathfinding code. So that gives you a sense of what is possible with what we have.