So you need microswitch contacts for start and stop of the track or you can do it more fancy using current sensors on the motor. Current sensors are usually preferred if this is going to be around humans or if the motors have any power at all. If you stick your hand in the track, the current sensor will sense that resistance and stop versus just using a contact switch the motor will just carry on potentially doing harm.
Add in a PC based IO controller, and the mechanics along with some code and you are done.
So what do you have so far? I am unclear what your actually asking. I get the concept and the plan. But do you have, don't have, and don't know?