I tried those cat deterrants many years ago (so they may work better now) but they didn’t seem to do the job very well. Partly because the cat had to be in ‘sight’ line of the device, so that if the cats were in a flower bed they could easily avoid detection. Also I think some cats are able to ignore the sound and there were reports of certain cats lying down right in front of them!
The only other experience I have is of rodent deterrants. Again, a long time ago, I was using one, only during the daytime and one evening a hog turned up early and visibly flinched when it went past the repeller. So I wouldn’t want to risk using either rodent or cat sonic deterrants when hogs might be around. If you felt confident that the hogs weren’t ever going to visit during the daytime, you could risk using one then, but hogs do sometimes venture out during the day.
When cats were being a pest pooing in the borders here, I used to use loads of fairly short sticks (from i.e. dried stems of last years perennials or other prunings) ‘planted’ fairly close together between the plants. That used to work fairly well. They do have to be pushed in quite far so that it isn’t too easy for them to be dug up. But the cats didn’t seem to like having to pick their way amongst all the sticks. The sticks soon ‘disappear’ when the plants grow up.