The problem with your belief is that you think working in a factory is preventing children from attending school, when it's the other way around: those children are working at factories because their families cannot afford to send them to school, whether that's because school itself is too expensive, or because they cannot afford to lose the income that the child provides. Closing factories that employ children would only result in those kids being forced into more dangerous work for less pay.
My belief is that every child should have the right to education. It's also true that many of the children working in factories are exploited for the exact reasons that you described: because they and their families are desperate and have little to no choice. Not providing that right to their country's children is a clear failure of government. China at least had the sense to understand the limitations of its economy, agriculture and educational system in fullfilling that obligation to its people and instituted the one child policy or family planning as you called it.