motor spins, encounters a switch that opens circuit, how to start again?

Imagine: 100 "trains" (it is not a train, but it is easier to explain this way, the actual project is a 10x10 split-flap display). Each train is on its own looped track. On each track, there is a switch which opens the circuit, stopping that train. At some later time, I want to re-start that train.

The specifics: I am using shift registers to control the 100 trains. I am using the shift registers to control coils on individual relays which then allow power to go to the motors powering the trains. When I power the train, it will remain powered long enough to encounter the switch. After enough time has progressed, I will send the low signal to all of the shift registers outputs, unpowering the coils. I may or may not be powering the same trains back to back.

The limitations: this project is on the cheap. For every dollar per component, the cost of the project goes up by 100 bucks.

I was envisioning either using a SPDT switch to send alternate signals down the paths and remembering which trains ran thus knowing where the SPDT switch is, but the cost of a true SPDT switch on-on is astronomical. I then thought of running 2 SPST switches instead with the same thought but again, the cost is prohibitive. I don't know how tackle this with momentary switches as the train would be resting on the switch contact when I need to restart it. Further, the amount of time the train needs to run to re-encounter the switch is well under a second, so trying to pulse it forward and then applying other logic might not be quick enough (especially considering the timing of 13 shift registers).

Further complications are that while the tracks are of equal spacing, the motor variations could mean that certain trains don't get to their cut-offs at the same time. So 1) basing it on time alone won't work and 2) having a single cutoff won't work.

The bonus: Since the project is actually a split flap display, I do have an initialization concept which is independent of any of the above logic to "zero" the display. Which means I should know where any switches are sitting at power on or throughout the entire running sequence.

Finally: I am at the very early stages of this project. I have purchased a few components to work on logic issues, but am putting together a nice large order but am waiting for any slick ideas to solve this one... I talked with some people and they thought XOR and/or AND IC's would help but I am unsure how.

Bonus: why not just use steppers? COST.

You need sensors to determine when each train is in a certain position.

You need relays (or similar) to control power to each train.

The rest you do in software, so you don't need to invent complex hardware for this.

Basically for each position sensor, when it detects the train (and you haven't just started
it moving) you switch off its power and it stops.

When you want to start a train you switch on its power (temporarily inhibiting the
logic that would otherwise power it down in order to allow it to leave the area of the
position sensor).

So you have to choose some sort of sensor, some sort of relay/MOSFET/switching transistor...

Could I use a capacitor to delay the sensor? Say I send the same 5v to energize the relay (powering the motor) and sensor but there is a cap inline of the sensor?

Building on my random ramblings...

Could I:
Use a logic XOR IC with inputs being 1) a 5v line on the momentary switch and 2) a 5v line with a cap being fed from the relay.

Train starts on the momentary with 5v going to the XOR and the cap not getting voltage to the other input. XOR is active, powers motor. Train pulses forward, past the momentary and pauses until the cap is full. Then the train runs until hitting the momentary, stopping the train again. I guess I would also need some way to fast drain the cap when the train first starts again... perhaps a single relay completing a circuit to some resistors? Is this just adding confusion to the mix, or did I stumble onto something?

motor spins, encounters a switch that opens circuit, how to start again?

Bypass diodes on the limit switches.