Okay. This is rotten and mean and can potentially hurt other animals, so use this judiciously. It is a definite "TAKE NO PRISONERS." WTH should we put up fences we neither want nor can afford (or would choose to use money elsewhere) because of stupid animals and ignorant selfish people? That is a moronic cop-out solution from people who have not had to deal with this crap -- literally AND figuratively.
We bought our house from an older couple, who were very close to the people across the street who have three dogs -- 2 black labs and one yellow lab. They would run up to our cars whenever we came in, run into garage whenever it was open (previous owners gave them treats). We have cats, and they also used our yard as there toilet. My wife was always petrified when the jumped on her when she came home from work. She had dogs growing up, but they never did that to her.
Tried to reason and be nicey nice with neighbors. Did No Good. Finally, watched to find out the exact path the dogs used to come into the yard to on a regular basis and dumped boxes of cayenne pepper down. They quickly learned not to come back.
Yes, it did hurt some of the other creatures, but we only did it once. Undomesticated animals were smart enough to stay away. The other thing I did (and turned it into a joke, don't know if it would work with your cretins, was to bag up all the dog $#i+ and carry it to the neighbors, knock on their door and say, thanks for the welcome gift, but no thanks.
Now, if they come into the yard, I call animal control. We are now "friendly" but definitely not friends with neighbors, but we drew a line of pepper in the drive way and garden and it sure made our point. (Actually felt bad for dogs, not their fault that their people were A$$Hole$.)