In what case is a long haul really required? Other than specialist superheavy or extra wide/long loads, everything should be on a train for those long runs. Modalohr [1] wagons make it very easy, although I have seen a specialised forklift setting semi-trailers onboard [2] trains in Rotterdam. This sort of handling is probably ripe for automation (there is a standard for the trailers, add some tags for computer vision and work on it from there). I saw something recently about a Modalohr-esque system to put hooklift containers on wagons for local waste collection in Switzerland.
My personal dream is that not only is port to industry fully on rails, but local distribution is rail-oriented also, to the point that a significant proportion of deliveries to shops in cities are made using pallets or trolleys loaded on freight trams. I do understand that the unusual nature of America makes this sort of change nigh-impossible, but maybe they could ship their semi-trailers on trains?
[1] https://en.wikipedia.org/wiki/Modalohr (second picture shows it best) [2] As in this image: https://forwardermagazine.com/wp-content/uploads/2022/03/Pic...