Custom orthotics were the answer for me........I'm very overweight and have flat feet, but these things eliminated probably 90% of my foot and ankle pain, as well as most of my knee and hip pain. They even helped my back, although I've injured it so many times I'm surprised I'm still ambulatory.
Yes, they were expensive, almost $500 for the pair, although my insurance picked up the lion's share of the cost. I thank God for them every day that I work---they've made the difference between barely tolerating 8-hour shifts on my feet and THRIVING.