Wow! A surprising amount of weaponry discussed for use of keeping dogs at bay! It's a bit of a shock (no stun gun related pun intended), but I'm a Brit, so having weapons on me to solve a problem just isn't really part of my thinking and I also have dogs and a parrot and I've never walked mine - the parrot that is, not the dogs.
I'd just like to ask how much of a problem is this? If the dogs would attack you or your bird, then that's one thing and causing physicalpain to the dog is sad, but entirely justified, but a dog running up and barking at your macaw...well...that's what dogs do. You're taking a parrot for a walk. Most dogs burst with excitement when they see another dog, never mind a tiny, brightly coloured dinosaur with feathers on. If there is no physical harm to you or your bird and the concern is fear, then perhaps you need to condition your parrot to dogs like you did the harness? I'm honestly not sure I would behave in a sensible, adult, parrot owning manner if someone walked past me in the street out for a stroll with a macaw nevermind my dog be able to control himself, he gets almost too excited to remember to breathe when my husband comes back into the room after he went to make a cup of tea!
If it were neighbourhood children running up and jumping about and screaming and shouting and trying to poke at your bird - as on board as I am with the stun gun approach in this case - you would have to find a different solution to keep your bird safe. Probably you would both ignore them until a little finger got a bit too close at which time your bird would swiftly bite it completely off and you could chew on it as you walked off...sorted.
Dogs off leads is not good and I recognise that the people who have their dogs off the lead are usually the people who should REALLY not have their dogs off the lead, but it's about level of risk I think.
Also you need to be careful that you don't grab for you stun gun rocket launcher taser torch as soon as you hear the pitter patter of tiny feet on the pavement beside you, because you will become tense, your bird will become tense and the dog will become tense.
I can only apologise for the above ramble, but somewhere in there I think there's a reasonable point or 2, even if they are well disguised...