That children don't really respond well to punishment because their brains don't do punishment very well. And a lot of developmental psychologists have this credo that the way to successfully raise a child is to catch them being good.
Because if you can catch a child being good and reward that they'll keep doing that. If you catch a child being bad and punish it, they don't yet have all the brain mechanisms that allow them to withhold that response. So a new way of understanding good behavior and bad behavior based on what we know about the brain and how it develops."
https://www.coursera.org/learn/soulbeliefs2/lecture/vgY1t/biology-of-thou-shalt-not-part-c