I, like others of my generation, lived through the epoch in which chastisement at school was fairly routine.
My experience is that it was far more often threatened than administered. As such it was extremely effective as a form of intimidation, which was the primary purpose behind many teachers' threats, in my experience.
Deterrent? As a schoolboy, I'm not sure what I was being deterred from. Was being lectured by an irate games master on the cricket field, the game held up in the process, and all because I'd failed to hold a catch - did that have justifiable deterrent force? Did the threat to take me off the field and cane me, make me into a better player? (It didn't as it happens. Justice - of sorts - was served on the master in question - he died young of a heart attack a few years later).
No. Too many if's and but's here, a dangerous road to follow. But I do concede the point: what the hell do we do with our out-of-control yobbos? Are they more out-of-control than the teddy-boys, mods and rockers of my youth?