Kicking an out of control dog is not very pleasant (for the kicker or the kickee), but you can’t reason with an unfamiliar dog guarding it’s patch. Sometimes it is a last resort.
Once when I was younger, I passed a farm on a remote fireroad and was chased by 3 dogs.
A few hundred metres up the road I got off my bike, and they surrounded me, snarling.
Thankfully at that point, my mate caught up and launched a rock at them- which sent them all scampering away.
So maybe throw rocks at them instead?