It depends on the places, where the cat leaves its droppings.
Usually cats prefer places with soft and loose soil like freshly raked flowerbeds or sand. If that's the case you can place chicken wire over the ground. At least my cats dislike that. An alternative is a layer of rough bark mulch. This also prevents cats from digging holes and burrowing their droppings.
In case your neighbours' cats don't dig but place their droppings on flat ground and possibly everywhere e.g. on the green, you have to resort to other means. There are certain substances that deter cats with their odour, available at hardware stores. Some of them are based on plant parts which are disliked by cats others are synthetic deterrents.
Deterrents are spread on the floor where cats leave their droppings. A major drawback is, that most deterrents are washed away by rain and have to be reapplied regularily.
I consider deterrent devices based on ultrasonic sound as inhumane to some degree, so I don't recommend them.
For difficult cases there are automatic robots with an infrared eye and a electrically controlled water hose. While expensive they seem to be effective.