So, parents must use their minds and hearts, not their hands. We must use anticipation as well as reflection. We must supervise our children until they have demonstrated a reliable respect for the kind of caution we want. We must model appropriate behavior always and we must explain our reasoning. To use physical punishment as an effective deterrent, it must be severe, OR discovery needs to approach absolute certainty.
Severity is judged subjectively, of course, and by the child only.
This magnifies the potential for greater than expected harm to the child and makes escalation to even harsher force a very real risk. Avoiding our discovery of a misbehavior is always possible, which makes spanking relatively intermittent and too inconsistently applied to assure the effectiveness supposedly desired. I think it is better if the child learns about the natural and logical consequences of mistaken behavior before they engage in it, especially when the consequences are very great. Natural consequences are certain, as they are inherent in the behavior and its effects. They complete the learning opportunity and allow choice.