So you would like your toy train to keep going on a circular railroad? You can always use a robot to get it done. As this video from Christian Schürch demonstrates, you can use a robot with a gripper to pick up and move tracks as the train moves along the path. It stops over the train to detect its current position and then takes action.
A FANUC M-2iA/3S robot was used to pull this off. As explained on YouTube, this was inspired by a school project. More info is available here.