The device you mentioned and others like them work. They just don't work immediately or for very long. The dogs grow accustomed to them.
Noise ordinances typically go into effect before 7 AM and after 10 PM. So if the dog barks at people passing by, Fed Ex trucks, etc., between the hours of 8 AM and 7 PM you may be hard pressed to get law enforcement assistance. Though if the dog barks non-stop, you might be able to make the case of a nuisance barker, should your area have one of those laws on their books.
As someone with multiple dogs, I would far prefer it if my neighbor came to me and said something like, "I'm uncertain if you are aware, but your dogs bark a great deal during the day." I'd have my dogs locked down so fast. I don't want to annoy my neighbors and I don't want them to annoy me. But most importantly, I don't want my dogs upset throughout the day.
Alex, since my yard has a 6' fence, I'd know right away who to suspect and I would follow up with every resource available, should someone harm my dogs. It's a lousy way to live, but after you have paid the fines for animal cruelty you'd never be able to quit looking over your shoulder. I would be coming for you.
Barking dogs, loud teenagers, and other weird behavior (right now one of my neighbors keeps their windows open and HE is a moaner!) by those who live next to us is a part of life. How you deal with it is what defines who you are.
But hey, he never complains about my dogs.