The absolute last jobs to be automated by AI will be those that require highly flexible sensorimotor skills, demand real time reactions, and involve significant risks.
Like even right now trains could be 100% automated easily. But the risk involved of transporting so many humans that could die if something goes wrong in a freak scenario, and the material damage of derailing a train makes a human supervisor/driver quite viable.
A lot of light rail and subway systems are entirely automated today. As far as I know, most of the systems that haven't automated conductor work are either grandfathered into union negotiations that preserve those positions or haven't been able to justify the cost yet.
Like even right now trains could be 100% automated easily. But the risk involved of transporting so many humans that could die if something goes wrong in a freak scenario, and the material damage of derailing a train makes a human supervisor/driver quite viable.