Either pick it up immediately or take him out on a leash (this can take weeks, no joke) and immediately remove him from the potty area once he's done his business. I had to put a flexi on my pup before I could let him out in the yard because he'd poop and immediately turn around to eat it. With the flexi, he'd have the room to go potty but as soon as he was done, I was calling him back in and because he had the leash on, he didn't have a choice. Havent had a poop eating incident in months. he's just over 6 months old now.
Shasta GSD 5/5/10 CGC, ITD, TC
"Dax" Thor z vom Weberhaus BCAT CAX2 CGCA ETD HCT NCO-1 PKD-T RATI RATN RA TC TKA 3/18/2013
"Hades" Guilty vom Blutfeuer 10/26/2018
Zena GSD 6/1/03-2/16/2016
Riley GSD/BC 1/10/05-2/1/2013