The UTIs… they were after the behavior started or before?
Pain can cause behavioral issues that continue after the pain is gone. The urinary issues could have been painful enough to give fuel to the behavior and now that they’re gone the behavior remains simply because it wasn’t properly addressed.
My arab who I grew up with kicked out once when it extreme pain. He got a massive tick infestation when out at pasture as an older horse. I brought him in and started working on his tail. It was so bad some of the skin had started to grow back over the tick crusts. In order to get them out some skin came with it. He wrung his tail and kicked out BUT…. it wasn’t at me. He could almost embarrassingly easily have knocked me out. But he deliberately kicked away from me. Not saying its the same as chronic pain, but it taught me what a horse is willing to do for someone he loves and respects. This horse NEVER kicked ANYONE because he knew he wasn’t supposed to. He’d kick out playing but not towards anyone. Not even horses he was put out with which is why he ended up in the bottom of the pecking order. He’d been raised with people so much people were his herd and I’m pretty sure he was not very fluent in horse. (isolated since he was weaned from other horses till he was 4, then was in stalls until he was 17 where he slowly was introduced to other horses in small turn out groups then one HUGE gelding group where he was bottom rung and spent most of his time standing near the mare pasture. He knew how to chat up ladies, hehe)
I sit with the continue looking for pain issues but definitely don’t over look the behavior. Which it looks like you plan on addressing both. Just I second that leaning into a horse and planting your feet won’t do jack on a horse sane of mind let alone one you expect to have some attentiveness issues (pain or otherwise). Heck, I’m sure you’ve seen how effective it is on placid school horses.