For a child to grow up with a correct and unbendable moral standing from within, here are probably the minimal requirements what needs to happen (all points are a must):
1. Child must spend in these conditions all the time from birth till the age of 4 with no interruptions. Till age of 3 - chances will still be good, but no guarantees.
2. He must live with a family of parents or foster-parents
3. The woman must breastfeed him with a healthy milk till at least 1 years old
4. There must be no less no more than one father or foster-father in the family
5. No grown up children living in the family
6. At least one mother or foster-mother in the family, but no more than 3.
7. Zero feeling of any competitiveness among the adults in the family
8. No more than 2 children per grown up woman
9. No other grown-ups nor children in the family
10. All children must be desired by all adults in the family throughout the entire time without ever getting tired
11. The child must spend zero time with other children within the family without close monitoring by a grown-up. And when he does spend time under the monitoring - only in short periods, separating them before any one gets tired and irritated.
12. The family must live alone in isolation from the outter world in as much as the children are aware. Any outside contacts must be very rare (like few times a year) and hardly noticable for the child
13. The grown-ups must maintain the family on their own in isolation, without engaging in any employments nor businesses nor trade. It means they must produce their own food and all the things needed, or must have obtained them outside of those 4 years of raising the child.
14. Zero outside contact for the child, including direct, online, offline, audio, visual and printed, incoming and outgoing. Any books, audio or video that the child has access to, must be carefully pre-selected by the family
15. This does not mean no travelling, but all the rules must be maintained while travelling.
16. Nobody in the family can like nor practice comedy, jokes, any smartass things and situations. Not even when children do not see. They just have to be that type of people. But it does not mean no laugh no excitement in joyful situations.
17. The entire family must be very reasonable and logical people in at least as much as the child can observe and comprehend.
18. The child must never get so much as a suspicion or hint for a blink of an eye of existence of anything more powerful than his family. No gods, no governments, no organizations, no armies, nothing. Sun, wind, water, mountains, and rain are the only things allowed.
19. No worshipping of anything nor anyone. Respect - yes, worshipping - no.
20. All this will cause no trouble for the child to enter the real world at the age of 4 or later, however evil it might be. He will take it like just another challenge similar to hunting a deer or defending from an angry rooster or bear, regardless of incomparable levels of complexity and violence it might include.