It's true that things were much worse for workers in the industrial revolution.
How'd they get better? Well, unions and government. It certainly for the most part wasn't corporations willingly paying their workers more or willingly making their working conditions better.