I believe it should, but there is a limit. Anything that seems too harsh whereby you embarrass the child, or hurt them severely I see as excessive. Coming from a child who was spanked, it worked on me, but I vividly remember snapping when my father started being excessive and using items such as a belt and wooden spoon to hit me with. I don't see that as okay, not in the slightest. If you can't get the message through with your hand, find another way.
Is it ever okay to spank children?
I say no. In my observation of children and my memory of being a child myself, I've come to realize that children learn more from following the example of others than they do from what you say to them. So if you tell your child, "Don't hit people," but you're hitting your child on the butt, what lesson do you think your child is learning?
I watched my sister raise my nephew using the time-out method: You tell the child what's expected of him, and if he disobeys, he has to sit in the corner and do nothing for a period of time. Two minutes for two-year-olds, three minutes for three-year-olds, etc. My nephew grew up to be a fine young man who is respectful of others. And he doesn't hit people.
I believe that it's very difficult to talk about one-size-fits-all approaches to parenting. A study that finds that spanking doesn't improve behavioral outcomes on average is going to be a study that is aggregating a lot of different children.
However, the difficulty with any violence, even very gentle and limited violence, is that it always teaches children that the way to deal with people they don't like is to hit them. Even when a parent can hold back their anger so as not to teach a child that it is ever a good idea to hit someone else in anger, it's still very difficult to do so successfully.
I was spanked once. I did something wrong but I was also a child and what I did was based on my inability to communicate my feelings at an adult level. Punishing someone for something that they don't have the capability to avoid is already a difficult pill to swallow. Doing so with physical violence is even worse.
Spanking a child will never be a good form of child discipline, because from young years our children learn coarseness and cruelty. This affects their psyche and then the parents can not communicate normally with them.