A dog eating poop is not weird and he doesn't have an emotional problem. What he has is a digestion problem created by an imbalance in the microbiome and he's doing his best to fix it.
The microbiome is a collection of over 100 trillion microscopic and living organisms in the gut.
This area of the body is where most digestion happens. It's also the largest area of the immune system.
Here's a brief explanation.
A thousand species of bacteria live and work in the gut. They total in the trillions and here's what they should be doing:
Antibiotics are the most common way the good bacteria is killed off. Since they don't reappear without help, your dog is trying to find them.
Your dog cannot live without enzymes either. They are needed to digest food and many other processes in the body.
In fact every one of the trillions of your dog's cells need enzymes to sustain life.
If you understand how cars work, think of enzymes as the spark plugs.
Sometimes your dog doesn't make enough of them but you can help with this too.
You can replace what he's missing with the following:
Better breath - often bad breath has more to do with a digestion problem than not having clean teeth.
Less grass eating - Another thing dogs do to improve digestion.
Less allergy symptoms - Yes, many allergies are also gut related
If you have two or more dogs and the dog eating poop only gobbles up the feces of those don't live with him, he has good instincts.
Dogs, like humans, will have similar microbiome makeup to those he lives with.