Child labour ended because of capitalism. The increased income and power that begets then allowed for child labour laws to come in - it certainly didn't happen in pre-industrial societies or capitalists wouldn't have been able to employ them in the first place. Same goes for slavery, not only did economic pressure from increasing automation make it less viable but the increased wealth and power of people within society who were opposed to it meant slavery was finally ended by the most capitalistic societies the world has ever seen.
John Fielden[1][2], one of the most notable social reformers, especially for factory workers, was the owner of a mill:
> On his father’s death in 1811, Fielden and his brothers inherited the family cotton-spinning business at Todmorden, which became one of the greatest manufacturing concerns in Great Britain. Unlike most mill owners, Fielden soon became a supporter of legislation to protect factory labour.
So we can see that any them and us is a false dilemma and hence, not true. Not only that, even with opposition from "most mill owners", reforms still went through (even though some MPs at times slowed it or watered down some of the reforms).
So, capitalists in a capitalist society did indeed do what no other societies had done before. As Fieldsen notes in his The Curse of the Factory System:
> Here, then, is the "curse" of our factory system: as improvements in machinery have gone on, the "avarice of masters" has prompted many to exact more labour from their hands than they were fitted by nature to perform, and those who have wished for the hours of labour to be less for all ages than the legislature would even yet sanction, have had no alternative but to conform more or less to the prevailing practice, or abandon the trade altogether
Human greed is not limited to capitalists, but the reforms were.
[1] https://www.britannica.com/biography/John-Fielden
[2] https://en.wikipedia.org/wiki/John_Fielden
Edit: typo and, of course, formatting. Why can't we get an editor, dear HN?
The spirit of the author's comment was that if you regulate for something becoming compelling, it would become compelling. That never happens. You can't regulate your way to being innovative. I think it was Ben Evans who said the difference between the US and EU is that the US sees regulation as necessary evil, while the EU sees it as an exciting project. Hence the different outcomes.