I think that replacing long-haul drivers will happen sooner than you think.
Self-driving (though human monitored) trucks are already operating:
https://www.wired.com/story/embark-self-driving-truck-delive...
I think the first step will be replacing long-haul truck drivers with autonomous trucks, they'll start at a depo near a freeway and end at a depo at the other end, then a human will drive to make the local delivery. Freeways are (relatively) easier to navigate than local streets.
That takes a 30 hour long haul job and turns it into a 30 minute job -- a single driver can do 10 of those a day.
Autonomous trucks will handle flats and other roadside breakdowns the same way many human drivers do -- pull over and wait for the repair service to come.
There's less incentive to replace train/subway drivers due to the high driver to passenger/cargo ratio (plus union rules get in the way) -- 1 truck driver to 40 tons of cargo versus 1 train engineer to 10,000 tons of cargo