I would worry about the owners response if I produced a deterrent spray too. They are often angry anyway, that my dog has had a fear response to their dog. I used to end up apologising. I don't now, If I they can hear through the barking, I take it as an opportunity to calmly inform them about assuming dogs on leads need space. I have got to the stage where a simple 'be nice' is enough for a quiet passing, even when the other dog is too close but once her fears take over, she isn't able to hear. I made some mistakes with her listening to others and trying to fit her into a box. Now I accept her as she is and work with her. It has gone a long way to making her a happier dog. I will not apologise for her again (unless it is my fault) but often people just don't realise. The conversation usually goes like this, as a dog is running over
'its okay he/she is friendly'
'She is not and needs space'
'Oh well he will learn'
Yes but she is fear reactive and other dogs make her stressed, we are working on passing without her becoming anxious'
I usually get an apology or a dirty look. If it is a dirty look I have to remind myself to 'be nice'