1. A child is about to stick a metal object into a light socket.
Grab the child. Explain the consequences. How on earth would spanking the child achieve anything?
2. A child continually acts up towards his sibling, parent, or teacher, and taking away priviledges/grounding does not seem to be getting through.
Then you are probably not targeting the most effective restrictions and doing it consistently.
3. A child gets into serious trouble, i.e. shoplifting.
The child needs to know that they are still loved but that they will face the consequences for their behaviour. You should probably look carefully at their choice of peer-group
I think parents overestimate how much influence they ultimately have on their children. You can only do your best. Teaching them that hitting people who won't comply with your wishes is not the solution.