Doesn’t capitalism lead to child labor in factories?

No. Capitalism did not create child labor working in fields or factories. It inherited it from the previous political systems. Observe that in communist Cuba of today 11 year old children are forcibly sent off to “summer camps” where they spend time working in fields cutting sugar cane and tobacco — this is called by leftists as “volunteerism” and “education”. Yet little mention is made of this.