My hip flexor issues were the result of spending so much time sitting and not getting the right exercise, I guess (I had back issues for a few decades, that I was led to believe was back issues by chiropractors and rheumatologist, but a few sessions with a masseuse led me to hip flexor assessment).
Mine are much better after years of stretching and exercising the hip flexor muscles, and the lower back and hamstrings and especially the gluteus muscles. It takes constant maintenance, but I still have horrible posture and sit too much, so not really surprised.