I've considered something like that, the only thing is that I don't think I can separate rails into types. Like last i saw cargo trains, you could drive a land train onto the cargoship lines because they are techincally both rails, so if I did lay down invisible track, real track might interact with it like this

Where red is the invisible track and blue is a path a train might calculate and try to take. I haven't confirmed it works like this though, the idea might be completely viable, I just haven't tried it