There’s a lot of information recently compiled on the biblical difference between “correction” and “punishment”.
Correction is done out of love with the purpose of redirecting the child to better choices.
Punishment is done to meet out “justice” out of your own sense of wrath (and that’s wrong).
These would include pillories and stocks.
Just the threat of the embarrassment of public humiliation would work many times.
When it didn't, trot the problem child off to be punished.
If a parent became over zealous, other parents or a cop could pull them away before the spanking turned into a beating.