When I got Red, he would push against any pressure on his head or face - if you put your hand on his nose he would flip his head or even heat butt. Same thing for pressure on the halter. It took a while, but as part of working through his bracing issues that head bracing pretty much entirely went away.
After he got over the head bracing, Red was so good about taking medicines by mouth - it didn't matter what it was - dewormer, bute, you name it, you could just slip it in his mouth and he would stand there calmly. Unfortunately, he came back after two days at the vet hospital with a serious case of almost head shyness about having anything administered by mouth, probably because he had to have so many medications and also possibly because he was restrained, perhaps with some force, when he was being medicated.
So, since I've been giving him daily doses of Ulcergard to ward off developing ulcers while he's stall-bound, that was a great opportunity to retrain him back to where we were before the vet hospital experience.
I've been working with him completely free in the stall - no halter. We started with my putting my hand on his face and his nose. I used approach/retreat, which I've found very helpful with things like this. I would put my hand on his face or nose, and keep it there (without pressure, just resting it), while he tossed his head around - he'd gotten that unhappy about any pressure on his face at all. The instant he stopped moving, I'd remove my hand and verbally praise him. We repeated this with my hand on various places on his face. That went pretty well.
The point of all the work was for him to choose to keep still, and to relearn that I wasn't intending to muscle him around. I learned some of this work with Dawn, who used to be dreadful about medicines by mouth - she would actually rear and throw you around the stall - she's now a peach about it.
Then I started working with the medicine tube, first just holding it in my hand which was resting on the side of his face. Same deal, follow the motion of his head, keeping my hand in place, and take my hand away (release) when he stopped moving, with praise. If he didn't move when my hand/tube touched him, I immediately took it away and praised him, and then worked to have him stay still with longer periods of touching.
The only time I moved his head with my hand was if he tried to leave, or to opt out of our work by trying to eat hay - I just gently asked him to stay with me in the work.
Then we progressed to my touching the corner of his mouth with the tube, then sticking the tube in, then finally medicating. It went very well, and I think after a few more sessions, we'll be back to normal and the "hospital learning" will be undone.