Personal experience: Every school I attended through 12th grade had corporal punishment in place. In 5th grade I was punished by a Catholic Nun who broke a ruler over my hands as they were laying flat on the desk. It was deserved and fixed the problem at hand and by example to the other students. (haha no pun intended). I actually have a fond memory of it now as they made my parents pay for the broken ruler. We laugh about it now and then. It happened again in HS and remember being scared shitless because it was being administered by a teacher with a good rep for painful swats. It solved the issues that time as well. Neither instance caused any psychological damage to me(that i’m aware of) and helped keep our learning environment a place where people can actually go to learn.
Corporal punishment is no longer practiced in my state. I would support it if it came back. It’s an effective tool.