Coprophagy is a normal thing in the animal world - even human toddlers are prone to it! For all young animals, it is about picking up a gut microflora that will aid them with digestion, synthesis of various vitamins, control of pathogens, etc. It also acts as a sort of "gut self-medication" anytime in an animal's life span. Many carnivores depend on herbivore manure for some "vegies" - already part-digested. Carnivores will also eat stomach contents
at a kill. It's completely natural and generally does way more good for the thusly dining animals than harm. Chances of carnivores picking up parasites from herbivore manure are remote - there aren't many internal parasites in common between those animal groups, so they'll just function as extra protein for the diner.
In human medicine, faecal transplants are now a thing to help people with chronic gastrointestinal problems. The main enemies of having a decent protective gut microflora are antibiotics, excessive cleanliness (go on, eat some dirt
), and modern overly refined foods. Drastic measures like faecal transplants from people with healthy guts are therefore becoming necessary for some ailing people. Coprophagy is a sort of DIY faecal transplant that's been going on for millions of years.
Rabbits are interesting animals from that point of view. They actually depend on eating their own manure so everything goes through their gut twice, to extract maximum nutrition. They produce green pellets for re-eating, and brown pellets that have been through twice and are discarded. Ruminants like cattle don't need to do this because of highly effective foregut fermentation, completely dependent on their symbiotic gut microbiome. In fact, you can kill goats by feeding them citrus fruits, because if they eat enough of those, it drops their rumen pH so much that it kills off their internal microflora. Horses are hindgut fermenters - that's a bit less effective than foregut fermentation, so horses need higher-quality forage than cattle. Foals all eat their mothers' manure to pick up the necessary symbiotic microflora for effective digestion of forage.
Just keep Fido off your carpet if he overindulges on the horse manure. And maybe he's overindulging because he's trying to correct a gut problem. Perhaps look at his feed - commercial dog food isn't that great for promoting a healthy gut flora.