I'm wondering why you'd want to stop this...it's free fertilization. It's not any dirtier than chicken, bird, frog, horse, cow, pig, or turtle poop, really, and it's buried, as is the pee. Since there have been gardens there have been cats to pee and poop in them and it doesn't hurt a thing.
Yeah, I know folks talk about salmonella and all that from cat poo but think of all the cats in all the homes sitting their anuses~and kitty litter walking paws~ down on furniture, carpets, countertops and tables with the exact same germs being swiped there as in their feces and tell me how many people touch those same surfaces~children too~then touch food and their own mouths, and then get sick from salmonella. And that's repeated, fresh exposure.
It's sort of like gagging on a gnat and swallowing a mule, when you think about it, to worry about the germs of cat poo and pee in a garden, especially if they have cats in their homes. The soil and rains make a great cleaner and filter for any potential germs, the sun and fresh air also kill potential germs, and, finally, rinsing the veggies before eating would take care of the rest.
In all truth, unless you carpet your whole garden in some kind of netting that prevents scratching or surround it in electronetting, it's virtually impossible to keep a cat out of a garden.