That transloading often happens anyway eventually.
And injecting some straight into the local railway network.
And running larger than Panamax ships on either side.
But running the numbers on it, you really can't compete on throughput, what with the truly massive capacity of cargo ships. Like, even if it had only 3000 conatiners, it only has to go at 1/1500th of the rail speed (assuming you can stack them two-high) to beat it. This page[1] says panamaxes have traditionally held 5000, with "New Panamax"es carrying 13,000.
(Edit: ChatGPT tells me that transit of the canal takes 10 hours on the high side, and it's 82 km long, so that's an effective ship speed of 8.2 km per hour, meaning the rail would have to go 20,000 km/h to compete on throughput.)
But yeah, the other advantages you mention would apply.
[1] https://en.wikipedia.org/wiki/Panamax?useskin=vector#Cargo_c...
What's perhaps more reasonable is to replace it with maybe 20 trains. You could maybe run such trains on a 10-minute headway, so 6 trains an hour, so 3 1/3 hours.
That's to replace one ship.
But it's also if you only have a single track rail line. You could build N parallel tracks along the same route. (This is far more reasonable than trying to build something where you can stack the containers 10 high or something, and then wide enough that it would be stable, and then you have to worry about the load-bearing ability of the track.)
But even if you build all those tracks, then you have the problem of unloading the ship at one end, and reloading a different ship at the other end. You can build enough tracks to get any rate you need, but can you get the load/unload speed?
We're talking about Mexico right?
But for the Jones act. Ask Puerto Rico, Alaska and Hawaii why everything is so expensive!
https://www.cato.org/blog/jones-acts-role-encouraging-puerto...
60% of all canal traffic is US containers.
Look at some place North Carolina... 1000 calls a year. There is rail, truck and warehouse infrastructure to support that. It is highly optimized because of domestic transit by rail and truck, of imports and exports.
If you optimize your profit, by dropping imports closer to the point of consumption any extra profit you make will be consumed by rail and trucks getting exports to you in a non optimal way.
The smart choice is to sail to the port where the exports are. But because you can't take that domestic cargo you going in a non optimal state... that empty transit time just cost you money because you have a 2nd captain, crew, ship, insurance and moving an empty vessel is waste!
Basicity the limits the jones act imposes means that you can't fully optimize against the cost and structure of domestic transit.
Iceland Airlines kinda does the same shuffle for transatlantic flights and self-loading freight ;)
That tends to imply that what you want in shipping is a bunch of reliable legs, not one point-to-point transport?
But if a shipping container is delayed a little waiting for a ship it's no big deal.
Those containers don't have to be loaded directly onto a train, they would likely get unloaded into a yard.
This sort of transport is used to complicated logistics, it wont' take long to get ironed out