I wouldn't worry too much until trains are all autonomous. They are on rails and don't have to contend with weather too much. Still have engineers in the cockpit. Knowhere near as complex as flying a plane. It may happen, but first would be a reduced cockpit of 1 pilot. If that happens probably got another 10-20 years before you'd need to worry about them flying solo. Airlines buying planes right now that they'll fly for 15+ years.