I find a cola can with maybe 15-20 pennies in it and a good shake will stop a dog doing just about anything.
And stop putting up ideas about hurting the dog. It's not his fault his master is an asshole. Next time the dog barks like this just call the cops. Tell them that while you don't blame the dog the owner has made no effort in calming the animal and has a blatant disrespect for anyone trying to help. File a report on him and encourage your neighbors to do the same. If it comes down to it ask that the animal be removed and put in either your own custody, if you like dogs that is, or put up for adoption.
Make sure to emphasis that the guys shoots his dogs when they get out fo line. Not only could he be charged with animal abuse, but discharging a firearm within city limits, if that's is illegal in your area.