Don't get me started .... Life is a constant battle in my garden against the vile little crapping machines. I've tried ultrasonic devices (waste of money), I've tried Renardine (which is now illegal to buy and doesn't work anyway). I set up black cotton trip wires which can be quite effective to protect young plants. I save thorny branches to put on borders to deter them. I've tried all kinds of useless stuff from the garden centre. On the rare occasions I get a chance and see them I use the hosepipe on them or throw anything I have to hand at them. The war goes on.
One grandparent nailed several 6 inch nails through a plank of wood then nailed that onto the top of the wooden fence at the end of the garden the neighbourhood cats used as a cat highway. That totally changed the patches local cats travelled. Helped by a cat chasing dog either side of the fences. I once saw a determined cat get halfway across then have to jump down and run for its life to be back!
Another grandparent had some quite vicious branches of thorns fastened to his boundary that was used by cats. I once saw a cat on top of the fence struggling to get off without getting a scratch. These were thorns that scratches you leaving vicious red lines that took weeks to fully disappear so the cats only jumped up there once and learnt the message.
BTW in don't condone that our any animal cruelty. Cats are just being cats, not their fault!
On an aside. My old village had a village Bobby who wrote in the neighbourhood watch newsletter on security issues. Being a keen and knowledgeable gardener he wrote about using plants to deter burglars. One plant I recall vaguely was a species of euphorbia with especially long and vicious thorns. Being a climber he recommended growing around drainpipes or windows to deter break ins. Apparently of anyone broke into a house with such defences the red Wealdstone would be so obvious and painful that if it was one of the regular suspects it would be sufficient evidence of being involved that he could get a warrant to search the culprits home on the basis of these especially bad scratches. It seems policemen back then had a vicious side to them when it came to burglars!