First and foremost make sure you take your dog to your vet (and it never hurts to get a second opinion!)
For a dog to not eat their poop they need to have developed great impulse control, and we also need to work with them in a way that their environment is setup for them to succeed. This means that while still training, you nee to avoid as many instances where your dog is able to eat poop, as possible.
Not having our dog repeating an undesired behaviour is always a win! Next you want to practice on those impulse controls. Do so by redirecting their attention little by little when faced with other no-to-harmful temptations indoors like treats and toys.
Once the impulse control skills have improved greatly, you can then put those to the test out on walks where you may want to actively seek out dog poop but practice again redirecting your dog's attention away (walking away is always best at first, as opposed to practicing a command like sit or leave it) and further practice by closing the distance between your dog and the tempting poop!