I had one horse who was a leaner. When I got her in 2011, she was 18 years old so this behavior was probably ingrained.
The farrier tried a couple of things. First, she pressed her side and that worked slightly for a minute. Then, the farrier positioned her hoof pick so that the horse was leaning into it and not her. When those didn’t get sufficient results and the mare would just lean again, she (the farrier) would wait until the horse started to lean, and then drop the foot, causing the horse to scramble to avoid falling (but not wait until there was a danger that the horse would actually fall and hurt herself). Then she made the mare move her feet by circling her around, a short around-the-handler circle on a lead rope, not a lunge line. She made her hustle, not just plod around. After a few times of having to work on this first occasion, the mare behaved but the farrier had to repeat this process on the next few visits. I don’t think she spent more then five minutes working with/correcting the mare the first time, and on subsequent visits it might have involved only a couple of instances where the farrier or I would react and make the horse move her feet, and I would estimate this took less than thirty seconds to have the horse hustle around.
Now this mare behaves quite well and the few times she thinks about leaning, I just give a little tap on her neck and a stern “Stand!” and she straightens up.
As for the training, I read that many farriers don’t have the time, desire or inclination to help you with that. I am grateful and lucky to have such a willing farrier, because I need all the help I can get. Also, I pay well, I pay on time, and I tip well every Christmas. I also offered to pay extra for the work she did with this horse. She refused, but I’m sure she appreciated the offer.
@Scribbler wrote, “Another thought might be to have the horse warmed up before the farrier so any stiff joints are feeling ok.” I think this is really important for a horse of any age, especially if it is coming right out of a stall.