capitalism came with machines that mangles children, chemical exposures etc. Things they can't possibly know the consequences of.
Realistically like a kid making a basket or watching sheep is not the same danger level as being pulled into a machine or getting silicosis before they turn 18
Britain passed the Children and Young Persons Act in 1933 source
USA passed the Fair Labor Standards Act in 1938 source
We don't have adolescence coal miners today in the USA as a result:
Certainly not perfect, and even these standards are under attack today in the USA to make them worse.
If you're extending this child labor in other countries then you're opening a whole can of geopolitical problems with notes of imperialism and enforcing one culture's values on another.