What part of walking and where is painful?
You mentioned stretching but are you doing any of the typical glute PT exercises? Crab walks, front/back monster walks, banded raises, glute bridges etc.?
Is it painful to do the motions required for strength training? If possible you might be better off flipping 1 and 2 in your plan. Assuming your hip flexors are inflamed some functional time under tension may help with healing better than “just” stretching.
It's a reverse of your situation but for me there's not much better of a posterior chain stretch than what I get at the bottom of a relatively-heavy squat or deadlift.