You can't really compare jobs like miners or print workers as those roles began to disappear, yet for some considerable time drivers will be needed on the railway.
If in 20, 30 or 40 years new trains are built to be self driving, and a Government feels it is time to try and get rid of drivers...