mentions negative stuff@kitten Have you talked with others who are train drivers? Maybe checked it out a bit? Who knows, there may even be a chance to come along in the driver's cab.
I don't know about the ones in your region, but train drivers are still pretty well paid. Sure, not as good as Software Development, but still on the well paid side. And they're always looking for more people. At least here...
Like SBB for example would pay CHF 4545-4914/m salary in your age range during the 15 month training (13 salaries/year here). And then after you're in the CHF 5726-6095/m range. With guaranteed yearly increases, etc.
Oh, also because of the nature of the job you get quite a bit of night/sunday supplements as well to boost the salary a bit...