Personally, I try to keep myself between my bitches, and any unwelcome approaching dog/dogs, regardless if I've chosen to stand still, or to continue moving in some direction.
But dogs have a mind of their own, and sometimes I've not managed to get mine to where I want them/they haven't stayed in that position when the other dog/dogs got closer. So like with other things, you can only try to do your best.
Carrying a whip, or walking stick, sounds like a really good plan. Perhaps try to make yourself a little mentally prepared by thinking through some possible scenarios. Besides, if it gets known among the dog owners that you carry a whip, and isn't afraid of using it to defend your dog, perhaps they'll start to try to avoid you. One could at least hope.