Well you have it all thought out and yes your the first line of defense is you. But trying to kick a dog puts you at risk. So a walking stick is an option,it's purpose is obvious and you might not have to strike the dog, just block him.
These usually aren't attack dogs they are just untrained A hole's out on a run, all they see is your dog so anything that disrupts there train of thought stops them.
There is also this I have one, never used it my dogs notice it but it doesn't seem to bother them! But my cats! Stops them from being A holes cold!
So it's a win for me!
And then there is mace or bear spray.
And of course being aware but as you say...they can come out of nowhere!