As automation and improved systems were deployed, railroad crews went from about 12-16 per train in the 1950, to just 1 or 2 crew members in 2025.

Some short lines and rail yards now use remote controlled locomotives with no crew members in the cabs. I saw these in use over a dozen years ago.
Big changes occurred in the late 1980s when the caboose and crew could be replaced with thermal imaging sensors along rail lines to detect overheating bearings (potentially causing a fire), and when airbrake functionality could be detected at the end of the train with a system that alerts the locomotive engineer of problems. Just like that, the caboose and caboose crew were no longer needed – and trains began operating with 2 crew members.