In fact we had a loose dog today. It was behind us. I have done LOTS of prep for this. We keep to a basic route most of the time, and they have been walked on loose leashes and trained to ignore distractions for quite some time. They do quite well.
If a dog ran up too close, I would dismount the cart and protect my dogs by whatever means necessary, but have not had to use anything beyond voice yet.
Dogs are not the real issue. RUNNING CATS are much worse, but we deal.