I've seen all of my mares--and donkeys--nibble on poop occasionally. They get loose free choice salt and LMF's Super Supplement, so I know they're not missing any minerals. They do it b/c they're bored. My horses are turned out daily in a several-acres-large dry lot: plenty of trees for shade and shelter, but no grass. They chew on the branches, and the twigs, and sometimes the poop when they want to do something. Yeah, it's gross to humans but not to horses, so just don't watch.
And my horses are dewormed daily so I don't have to fret about worms. I don't worry about it.