Hope you’re doing well... what I would do is if your horse backs up make him work by lunging, backing him up, yielding hindquarters if he does well an accepts the fly spray being sprayed on his body then reward him with treats
I just make the horse get used to the sound of the spraying. I fill an empty spray bottle with water, spray it on the wall in the box, and give him some food in his feeding tray. Continue doing this until he ignores the spraying. Then repeat but spray close to/on his body, and give him food when he relaxes/stops moving away 😊 makes it a positive experience!
That would probably make your relationship worse and he would recognise you with forceful actions that you did to him the brush still does the very same thing your horse could injure himself when he ''backs off'' yeah your horse will love you for that ''relationship'' it's called a natural instinct that horses do
If he doesn't like the fly spray, then it's your job to ensure that he eventually does like the fly spray.
If you squirt the fly spray on him and he backs off, make him work, either through lunging him, backing him, yielding his hindquarters, etc. Make him work for a good few minutes before allowing him to stand and rest, but ensure that every time you allow him to rest you spray him to let him know that the fly spray means rest and no fly spray means work.
Remember, make the wrong thing hard and the right thing easy!
It takes perseverance but it strengthens your relationship with your horse and makes him more trusting of you.