(Pro 17:10 KJV) A reproof entereth more into a wise man than an hundred stripes into a fool.
It would seem that confronting the mind has better results than punishing the body. It is not that people are not able to learn from physical punishment. The point would be that it is limited. When a child is reaching to pick up a scorpion you may not have time to reason. It can be taught not to pick up a scorpion but the slapping of the hand may teach it nothing about picking up a centipede. That requires the engagement of the mind and the mind must be willing.
Reaching the mind requires spending time in relationship. It requires listening. It requires looking for ways to communicate. None of those may be available when the scorpion crawls out from the corner but after the initial confrontation there is time to work on it.
So? It takes a bit of wisdom sometimes to know if you have time to explain or must demand. Don’t rule either out. Keep in mind that there are fools out there.