The high frequency sound devices do make dogs upset. I bought a handheld model about 20 years ago. You (or I could) actually hear it, and it emmited a squeal if you were close. I bought it because the neighbors dog would get thrown out each night and he would bark. I have no idea why the owners are the only ones who can't hear the constant barking. Hours on end.
What you've got to understand is the devices do irritate the dog. But then he's already upset, these just make it worse. If he's not barking and you press the trigger, he'll start. Like so many things, it can be used for good or bad. If you don't like your neighbor, and his dog is inside, you can get him yapping just by pressing and holding the trigger!

But then he tosses the dog out the door and you get the noise.
We tried it on our young dalmatian when he started to bark. It made him bark more. I'm thinking its a loser.
The best anti-bark devices are usually .30 caliber. One of our lurkers here, my buddy Joe, says he used to listen for a while, then he'd go outside and let loose with a few rounds. Generally in the direction the noise was coming from. He lives kind of out in the country. If the gunshots didn't shut the mutt up, the neighbors who could ignore the barking would get the idea and shut the dog up. Well, that or they were worried about the lead hitting their house.