The problem is the OWNERS, not the cats! Too many folks have cats or dogs and don't take sufficient responsibility for them (in all respects).
We've got three cats, and they either use their litter trays in the house, which are frequently cleaned, or do their business somewhere in OUR (read as their) garden, in order to 'mark their territory', as it were, as that's what they've grown used to, and therefore have no inclination or reason to piss or shit anywhere else.
Therefore, if you've got cats and don't want them to defecate in neighbours gardens, the answer is either to bring them up from young kittens simply to be 'house pets', so from day one they know nothing else but life indoors, as indeed is the case for those who live in high-storey flats, or provide them with a garden to use, plus also litter trays indoors, when the weather is bad, and which are kept scrupulously clean, as cats are very clean animals.
Don't just kick them out at night or in all weathers and worry not what they get up to - TAKE PROPER RESPONSIBILITY and get them used to a routine. During the summer our cats are allowed out until 7pm, and in the winter 4pm, and we don't let them out at night.
They know when it's time to come in, and so when they're called, they come in. And they're perfectly happy with that arrangement, as that's what they've always been used to, and indeed at night sleep with us! That's been the case with all the cats we've ever had - we treat them not just as pets, but as members of the family
And if you're unwilling or unable to take such proper responsibility for the animals you own, cats or otherwise, then don't have pets in the first place, simples!!
Marco.