I know nothing about dog psychology. If it were a herd of cats, I could probably outsmart them somehow.
But for dogs, I carry this:
It's Mace duct-taped to a visor glasses thingy. The Mace I use squirts out in a long orange stream. I've only fired it a dog once. He saw it coming at him and he turned tail. The Mace never even made contact with him. It was a win-win situation.