Sorry for the messy post. I am in a hurry.
A couple of comments/questions before writing actual suggestions. I am not excusing his behavior, but I am just wondering about:
I don't know what "ally spray" is, so... excuse this next question, I guess. Even superficial wounds can sting - a lot. Is this a no sting spray? If not, look for one that doesn't hurt.
How did you spray it? If it felt like flies in/around his wound (like, the actual spraying action and the excess drip), that maybe why he kicks out. Some horses kick out at irritating stimulus.
Can he see you? Is he comfortable with having you mess with his hooves/back end? Cross-ties are very limiting. I could go into a long rant about why I do not like them, but for the TL;DR, yeah, horses don't like them because they restrict physical movement. As flight animals, this can cause them to go into panic or fight mode. Does he kick-out when single-point tied?
What was he like before you sprayed? Can you handle his butt area and back hooves/hocks? If he gets you *that* look, tosses his head, pins, bites, etc... and you ignore that, he may feel that kicking is the only way to get you to listen. Pay attention and listen to him *BEFORE*, during, and after you spray. Horses don't always go 0 to 100. They talk, but if we don't listen, they scream.
Where is he cross-tied? BE SURE THAT YOU HAVE MORE THAN ONE EXIT. I've seen/heard about people cross-tying a horse in a three wall area. One way in and one way out. That can be fatal, especially with a kicking horse. Don't.
Horses generally have very good aim. Since you were so close with the spray, I am sure he could kick you if he wanted to, but he chose not to. I think it is either a warning that something hurts or that he is testing you.
Can you have someone hold him while you spray? That way you can correct him/move his feet. Hitting a horse in cross ties is not a good ideal, really. Again, as a flight animal, getting sprayed (which he doesn't like) and getting hit (which he doesn't like) can cause him to go into fight mode. Very dangerous. Cross ties restrict movement of the head. Horses can't see behind them. If you are in range, he could kick you without meaning to because he can't see great where he is aiming.
I think you need to get a new trainer. A good trainer would not let the horse to become a pasture puff after betting bucked/kicked/etc...