Oberon never developed the poo habit, not sure why. We also lived in an apartment complex when we first got him, so I understand the difficulty of dealing with other people's less than perfect habits. For us it was (believe it or not) someone leaving half eaten pot pies on the sidewalks. I didn't want him eating them, both for the obvious reason of it not being good for him and because I'm a little neurotic and was afraid someone was trying to poison the dogs in the complex. Oberon, of course, shared none of my suspicions and just smelled something that would taste really, really good. When he first went after one, I jerked back on the leash, said "Leave it, nasty - no, no!" in a rather harsh voice (no yelling, but obviously upset). He looked at me like I was crazy to expect him to leave a delicious-smelling treat behind, but his instinct to please me overcame his desire to eat the pot pie. He left it, came back to me. I gave him a few treats, praised him to infinity and beyond, and we went on our way. After that first time, whenever we found a half-eaten pot pie (and yeah, they were surprisingly frequent), he would look at me, I would say leave it, and he would give the Sheltie equivalent of a sigh, come to me and sit, and get his treat.
I think the same thing would work with poo. The key was my obvious distress, and his desire to please me.