While stopping to chat with a friend on my my dog walk, my puppy picked up a plastic bag of poop that I had set down. Thinking she was helping both me and him out, my friend started firmly calling out "no" while rushing after him. It scared him a bit and my friend was a bit alarmed when I quickly stepped in and told her to stop. I explained that if my puppy is ever going to pick something up in his mouth I don't want him to avoid me because I am saying no and chasing him. That instead of grabbing it from him I would offer him something else to put in his mouth (food, toy). That if I don't want my puppy to pick something up in the first place I will be paying attention (definitely what I was NOT doing in this situation) and will call him to me before he picks up the item. There ya go, no need for punishment and its potential side effects.
I have seen the fall out of punishment in many dogs that I have worked with (including my own!). People describe these dogs as thieves or sneaky and claim the dog is "blowing them off." Their dogs have learned to avoid punishment or avoid having something taken away from them. Punishment has the risk of breaking down respect, instilling fear, and reducing happiness between you and your dog.
Here is what Jean Donaldson has to say about it in her book, Culture Clash (Berkeley: James & Kenneth, 2005).
"If you administer punishment correctly, the punishment may buy you a temporary suppression of the behavior. Remember, you have not killed it but merely brought about an emotional state which is incompatible with the behavior you want to get rid of (the animal is too upset by the punishment to do it for the time being). He is also, incidentally, too upset to do much of anything right after a punishment. Punishment is like a carpet bombing. The behavior you wanted to target gets hit but so does a huge portion of the dog's whole repertoire. Dogs who are punished a lot behave a lot less in general. What's particularly scary is that this is what a lot of dog owners actually want. They want a general toning down of the dog. It is a sad comment on human-dog relations when we claim to love dogs and then attempt to behaviorally lobotomize them with thousands of leash jerks in the name of "obedience." The bland, behavior-less animal many people bond to so strongly can scarcely be called a dog. It is the ghost of what once might have been a dog."
In this modern day of dog training, the whole process has become far more kind, respectful, and enjoyable.