Regardless, what does this have to do with the discussion?
The factory owners largely didn't care and caused quite a few large scale accidents facing little to no consequence for it.
That only changed in Europe after strikes, unions and socialist programs got punched through (also stuff like the 48 hour work week, 2 days of rest a week, sickdays, social welfare and healthcare and a lot of other stuff that was largely not capitalistic in nature), in the US only after anti-monopoly rulings where deployed en masse (while still paying out the factory owners shitloads of money).
China has a sort of partial capitalism in that some big companies are 50% owned by the state.
That isn't capitalism.
> In later stages it actually did keep those people there because they either couldn't afford to leave the city without half the family starving
I'm not sure what that means. Cities weren't that big. Just walk out and go live on some uninhabited BLM land if you don't want to participate in the capitalist economy.
Well, everything was steered by capital that the factory owners had.