Banning child labor is literally the "I'm helping" meme but for government.
Child went away mostly on its own (as did labor by the disabled) because industrialization made all that non-competitive compared to a normal adult operating some machine. Then, once child labor was relegated to a few niches of limited overall economic importance the government showed up and banned it to win a few brownie points from some jerks.
Child labor isn't a success of some socialists 100yr ago. It's a success of some propagandists 100yr ago.