> A crew member of a train has a very demanding job.
The ratio of staff on a train to the count of passengers is much lower than on a bus or in a plane. Even less for freight.
> The shifts are highly irregular and you may have to spend the night far from home. In this regard it's even worse than flying.
This assume either long distance trains or slow trains. This can be solved
Why would have shift to be irregular. Trains run on a schedule.
> Particularly busy railroad crossings also require staffing, even if they're ostensibly in the middle of nowhere.
Just get rid of busy crossings. Build bridges.
I recommend to come to Europe, and especially in France, for a trip in the TGV. Paris to Marseille (650 km) in 3 hours from city center to city center.