Rail freight will probably be impacted by automated trucks sooner than road freight, weirdly enough.
My guess about the industry's progression:
* Automated trucks take over long haul routes (e.g. highway driving) between major distribution hubs, and previous long haul drivers move to middle and last mile routes.
* Shippers begin to shift freight away from trains and towards trucks (because price of trucks goes down, speed of delivery goes up)
* Automated truck centric freeways (or lanes) begin to show up, allowing for higher density and speeds of truck traffic. Price further falls, volume increases. More jobs created in short and medium haul trucking to handle increased volume of things being shipped.
* Automated trucks begin to be able to handle medium haul (inner city between warehouses), jobs start declining.
* Automated trucks begin to be able to handle short haul (last mile), truckers are a truly dying breed at this point.