Container ships produce a lot of emissions, but they also move a lot of cargo. On a CO2 per kilogram per mile basis, containers ships vastly beat out automobiles.
Automobiles are the worst and least efficient mode of transportation, and should be severely curtailed.
But yes, on the whole it's correct that common assumption that the distance freight travels equates to the overall carbon intensity of transit is incorrect.
A more effective change would be to make transportation emit less greenhouse gases. Get hydrogen powered container ships and electric vehicles. This would reduce greenhouse gases significantly more, and wouldn't involve destroying the global economy.
Do you think ammonia or hydrogen is more likely to be used for ships? At this time, I am leaning towards ammonia because storage and infrastructure is simpler.
Funny side note: While writing this post, I was doing a bunch of Google searches about ammonia, hydrogen, and blue vs green. Every single search returned a single ad from Saudi Aramco touting their blue ammonia and hydrogen capabilities. Incredibly depressing. The non-petro states need to hurry up and cover the center 80% of Australia with solar panels (Chilean Andes and North Africa too) to produce whatever green industrial inputs we need from "thin air". Maybe we can run a bunch of carbon sequestration machines too. In parallel, we can drive up carbon taxes.
Per the source above, rail is most efficient at 128k, then ships at 97.3k, then road at 10.8k, where units are in tonne-kilometers shipped per tonne of CO2 emitted.
If Country A can produce 100Mt of raw material by digging up 10000ha of already-destroyed farmland, and Country B would need to clear 100000ha of pristine untouched forest for the same amount of raw material extraction, wouldn't it be better to source from Country A? At least up to some point where the environmental impact of oil used to ship 100Mt of material from Country A is worse than clearing 100000ha of pristine untouched forest.