Pain is a language most people understand. We learn a lot from pain, such as wearing shoes when we walk on gravel, keeping our fingers out of the way when we chop vegetables, and using hot pads to retrieve food from the oven. I'm not saying pain doesn't have its purpose. It motivates us to avoid a lot of injuries, and probably improves our health and life spans. But I think when we use pain to teach everything - even lessons that are not intrinsically painful - then we undermine the message.
There has to be some reasons besides pain that we behave certain ways. If you're using pain as the motivation, then you aren't using the real reason. I would argue that if a child is not responding to spoken language, then you need to adjust the message to something that they will understand and appreciate. Unless you are suggesting that the child is totally incapable of understanding his actions on any level. In that case, I would argue that redirection is best. Have him avoid that situation until he is old enough to understand how to behave.
Avoiding pain is a dumb reason to give a child for acting a certain way. Eventually you won't be able to administer pain, and then what? Either he doesn't care to behave any more, or he's ready to consider why it's important (in which case, what was the point in teaching the false consequence of pain in the first place?). You also run the risk of teaching them that violence is how you control other people's behavior. It may not seem like much, but the truth is, they learn how to relate to others by emulating the adults in their life, and if you gyp them out of examples by conducting all your negotiations via spanking, you're not leaving them with a whole lot of strategies to emulate. Perhaps they'll resort to violence, or perhaps they just won't be very effective communicators/negotiators at all. By taking the time to figure out how to teach them a lesson respectfully, you teach them to give others the same courtesy.
While I agree that spanking is much better than beating, I disagree that it's different punishment altogether. Either way, you're using pain to teach. You're skipping dialogue and thought. Perhaps that's okay when you're trying to teach a lesson about pain and don't want to inflict the real thing (such as getting hit by a car when darting out into traffic). But spanking as a disciplinary measure for behavior is, I think, a poor choice. It teaches nothing about why. And personally I think that teaches them not to get caught more than anything.