In my head, semi-trucks (and maybe all cars?) only need 50-100 miles or so of range for low-speed (where batteries shine) warehouse/ports/downtown deliveries (or garage-charged commutes?).
Almost every trip I've ever taken beyond ~20 miles included at least some portion on a highway. Electric interstates could allow NY to LA in one shot and pulling off the highway with 100 miles to make the round-trip to wherever a load needed to be dropped off.
If attaching and detaching was automatic, there would be no need to electrify onramps or intersections or underpasses or anything expensive, just find the cheapest, straightest, easiest to electrify 80% of roads and slap up wires there.