The first Federal law to regulate private companies in the U.S. was aimed specifically at the railroad industry. It was the Interstate Commerce Act of
1887. It's also worth noting that the first Federal highway system was established after World War I largely to provide an alternative means of freight transportation that would compete with railroads. Political and business interests in this country had simply determined that the railroad industry had become too powerful to be left to its own devices, as evidenced by the fact that almost all of the companies in the original (pre-1996) Charles Dow index of U.S. industrial stocks were railroads.
Do some research on the Great Railroad Strike of 1877 in West Virginia and see how that ended. All of this laid the foundation for what we know as modern Federal railroad regulations.