Sonic scarers, coloeus canina, and other products do have some effect, especially if you have a small garden. But if you have a larger than average plot, it can soon get expensive. The last house we lived in I counted that approx 14 different cats used our garden, they seemed to have their favourites places to excrete. The most effective and cheap way to stop this practice, was I kept all the trimmings from berberis, holly and other prickly things and laid them in their favourite spots, which had the desired effect. The only downside , was these had to be removed when maitaining the garden. Have also heard that orange peel, broken egg shells are also good, A friend use to put small amounts of gravel in empty coke bottles, with some effect. But needed a bit of breeze to move them, to rattle ,apparently it frightens the cats.