In an actual production context, and if time permits, I would build our game's level editor differently. I would instead design a top-down track editor that would allow the level designers to draw rails and drag and drop obstacles on them. The designers would then be able to save their work in a serialized format.
Then, using spatial-partitioning principles, the tracks would be automatically divided into segments by the TrackController class and put into an object pool. This approach would automate the process of generating individual segments while optimizing the spawning process.
Consequently, the designers would not have to author individual segments as prefabs, and they could design new tracks while visualizing the entire layout in an editor.