You've identified the problem, the railroads are a captured market, but it's because most regulatory bodies are operated by former agents of those industries or those taking large amounts of money from those industries. These industries DO get bailed out, because they have captured the regulatory mechanism. Their wealth consolidation allows them that power, especially in the post Citizens United world we live in.
The things you view as failings of the government are corporate successes in the never ending squeeze of year after year growth.
The power structures inside these corporations are squarely authoritarian in their design. You have no real agency within your workplace. The most freedom I've ever experienced in my work history has been working for government agencies, specifically public education, doing IT work. This idea that, in the absence of government intervention, we (citizens) would have the agency to do the right thing in these moments completely ignores the massive amount of leverage the corporation has over its workers. Since these corporations are top down, hierarchical, and authoritarian in their organization, the only will the workers have is that of those at the top. In this case, the executives and shareholders who historically have shown to not be interested in taking a loss for the sake of safety.
You mention that, under the utopian vision of the free market, we would go to another vendor. So who would we decide to transport with? The rail systems are regionalized and to get from one part of the country to the other you have to make trilateral or quadrilateral deals with these companies. In other words you are forced to use all of them on some leg of the journey. This regionalization means that there is an oligopoly on the rail system. How are you going to create a "competing" rail system in any of these regions when these companies own all the rails?