This logic is somewhat flawed
You should punish someone if they do wrong
Teach them consequences have actions
That's why we have prison and community service
Kant is arguing that goodness can't be expressed only through it's reward, nor badness only through it's punishment. He's not saying that there shouldn't ever be consequences, only that those consequences can't be the full representation of moral behavior.
I mean sorta? Kids needs to be taught what's morally right or wrong then when they get old enough to think and critique their own thoughts and actions they can change them or keep their morals the same. It's more like teaching somehow how to be a good person, whether you find reward in doing good is up to you
Teach kids to feel good about themselves as a result of doing the right thing, then every time they do the right thing they reward themselves with feeling good - that's the proper use of self-esteem. There's nothing wrong with a good healthy dose of guilt for doing the wrong thing.
You should punish someone if they do wrong
Teach them consequences have actions
That's why we have prison and community service