Replacing roads with railways means nearly complete reliance on a central authority for all transportation needs. This authority decides who gets to leave town and who doesn’t, which companies have priority when delivering goods, how or if the parallel railways should scale to meet more transportation demand, etc.
Transportation safety is important but it shouldn’t be considered in isolation when there are potentially catastrophic consequences to prioritizing safety at the cost of everything else.