It's a problem that will plague most dog owners at some point. Puppies are the most common offenders. The good news: they usually outgrow it. However, such is not always the case. We have a 12-year-old who still "grazes" on occasion.
The behavior (the ingestion of feces) is called corprophagia (or coprophagia). It's natural because mothers eat their puppies' messes when they're still in the whelping box. Dogs in the wild may eat each others' stool to gain nutrients that were not digested the first time they passed through the system. Dogs may even be mimicking the behavior of their owners who often scurry to pick up (and discard) their dogs' feces from their yards. With some of today's nighly nutritious commercial dog foods, it's even more common for dogs to "eat it again" so they can benefit from what they missed the first time.
Dogs more commonly eat stool in the winter when it's frozen and has a better "mouth feel" to them.
Contrary to popular belief, this behavior does not mean there's a medical or nutritional problem with the dog. Nor will this activity harm your dog, unless he's picking up parasites from another dog's stool.
You can buy food additives that will make the stool less palatable to a snacker. But they're expensive, inconvenient, and often ineffective. Punishing the dog usually won't work either, unless you're using an immediate form of punishment like an electronic collar....and even then, you must assure that the dog is corrected 100% of the time he offends.
The best bet is still to rush outside and scoop the poop yourself, before your dog can snarf it up. If you catch your dog in the act, just make sure he has plenty of clean water to drink. Brushing his teeth daily with a doggy toothpaste will also help his breath and oral hygiene. Supplement the toothbrushing with C.E.T. Oral Hygiene Chews, available from your vet or some pet retailers.
Our 12-year-old Swissy sporadically eats dog poop, loves cat poop (yuck!), coyote poop, deer and elk poop, and horse poop. We correct him when we see him. But most of the time, I'm sure we do NOT see him eating it. He is 12. 'Nuff said. Heck, maybe it's good for him after all. If I don't see him eating it, I can pretend he hasn't. But I'll still brush his teeth!