I never used any form of corporal punishment with my children... I was spanked and quickly realized not to get caught next time.
I used time outs with the first... worked well, and with my second... I put her on ignore, literally would not speak to her for an hour.
Not so different from training dogs lol
Hitting dogs doesn’t work... training them does.
So you STILL misbehaved; just on the sly!