An automated system could be made for this. Imagine two tracks side by side. Now have a mechanism above that lifts goods off one train and into another. The mechanism could work on moving trains such that a 30 mph train could unload all its cargo and have it all loaded into a neighbouring train also moving at 30 mph. Such a mechanism would be expensive, but only needs to exist at cargo borders, and the cost would be…
We have a light rail here in Zürich Switzerland that is a Tram while in the city and a Train when it is outside. It switches from 600V to 1200V and back halfway through the journey and it does this all day long without any issues. [2]