Although it seems disgusting to us humans a dog eating poop is not harmful at all to the dog.
Actually when the dog eats it's poop it's beneficial to the dogs health and digestion and there's nothing wrong with the dog eating it's own poop.
However if the dog eats other poop such as rabbit poop or horse poop or any other animals poop then the dog could potentially get sick of the other animals poop is infected with parasites or some other disease.
So you should certainly keep the dog from eating other poop but it's perfectly fine for the dog to eat it's own poop.
But you can add some pumpkin from a can to the dogs food or some meat tenderizer to the dogs food to make the dogs poop taste bad and the dog will cease eating it's own poop.
But it's certainly not gonna do the dog any harm to eat it's own poop.