is the horsey hairy at all?
I'd certainly want to rule out leg mites first.
Other wise, if it is purely bad habit (or, even just a sensitive horse!!), this is what i would do.
I used to have a mare, that was literally bought in from the wild - she was a fair size (15.2hh), and never ever touched by human hands.
She was terrified, and it took a while, of spending hours sitting in a stable, before she eventually got more relaxed and curious, and I could touch her nose....anyway, progressed on, i could touch several body parts, and by frequent touching, and calmness she was becoming de-sensitized.
Legs - I thought was going to be a real challenge, as every time I got near - she would
stomp.
Anyway, I made a long stick thing, with a stuffed glove on the end, and purely used it as an extension of my arm to rub her legs up and down - eventually, we moved to my own arm/hand when i new she was ready - picking up feet was easy after this.