I’ve seriously strained and sub clinically injured my hip flexors many times.
From your description, it sounds as though your pelvis is not symmetrical. Neither is mine. I think that’s the root of the problem.
My injuries have always been from running longer distances than I had the fitness for or from rock climbing. Lots of high stepping and twisting and whatnot. So far I haven’t mentioned cycling but neither did you.
For me it took time. I do some stretching and strengthening. I honestly can’t say if it helps or not.
I’ve considered getting power cranks for their claims. They’re expensive and weird though.