What I did was every time Kali had to poop I took her in the gutter and praised her and that way she learned that she has to poop in the gutter when walking - or in grass if in the garden.
Very clever dog - and I score so many points on people noticing how well trained she is