It may repress it, but it will come out later. There's no way you can permanently suppress obnoxious behavior. When I was a young teacher, I didn't do this. I punished the students, but most of the time I'd be at my wit's end trying to control a class, including having a hyperactive student hold a chair out at arms length. It's the same students being punished weekly.
People misbehave because they're feeling bad about themselves for some reason.
All obnoxious behavior grows out of the need to be loved, and it is the very thing that drives love away. Eventually, if a teacher is lucky, he stumbles on the realization that the way to change behavior is to love the students, but as an early teacher I really didn't know how to love others. Maybe when you're young, you're so wrapped up in yourself that you can't reach out to others. You really have to care for the kids. If you do everything right but don't like the kids, they'll detect it, and your plan will fail.