I suspect the key is to find ways to run railways cheaper. It has been a long time since railways were under severe cost competition encouraging people to look for efficiencies.
I think the main one would be to find a way for railways to operate with no staff. Just like a typical road operates most of the time with no staff.
That means you need to redesign everything that currently uses people to not need people. Sure - there would still be occasional maintenance - but nobody always on duty driving trains (automated), nobody selling tickets (online), nobody cleaning stuff (automated cleaning of trains inside and out) etc.