Sensor water sprinkler, however you’ll be left with a wet garden.
You could set up a couple of those Halloween decorations that go of when someone approaches. Though to be fair if I approach your garden and one of those goes of it’ll not be cat shit you’ll have to worry about.
I bought a tub of cat pepper from the hardware shop and didn't read the instructions before pouring the whole lot on my very very small front garden. It reeked of garlic for at least a week to the extent it was quite embarrassing, but it worked wonders. I think you have to go in quite tough and ensure you put them off then they get in the habit of going elsewhere.
I now keep a water pistol (a very gentle one) by my back door which I use to deter any newcomers from the back garden as baby sleeps out there sometimes.
Mothballs, they don't like the smell of naphthalene. Just make sure the mothballs are out of reach of your kids and other animals, although I doubt very much anything would eat them. The mothballs I buy are in a white plastic cage with a tab on the end and I use a nail through the tab to attach them to the trunk of a tree, timber fence etc etc.
If possible put them somewhere they won't get wet as this makes them deteriorate quicker.
I've tried white pepper but it gets blown into unwanted areas. Neighbours cat sleeps on my car so I put a container of mothballs near the wipers and move them before driving off the next time. Of course, the cat here 'never' leaves it's own yard/house/etc...according to it's owner when I warned her that I would be using mothballs!!! Takes all kinds.....