If you have a dog that is eating poop - start
feeding him a nutrient packed / balanced diet, give him plenty of exercise / playtime / interaction, keep his living areas / crates / kennels / yard as clean as possible, avoid locking him up and leaving him alone for a long period of time, and take him to the vet on a regular basis for checkups so that you can catch any
underlying medical
issues early before they get out of control.