It addition to swapping the IRA > 401(k) order to 401(k) > IRA if your 401(k) investment fees are low(er) compared to your IRA, in the last few years before retirement I could see there being an argument for swapping 401(k) > Roth IRA (assuming income is too high for traditional IRA) even if the 401(k) fees are high because you'll be able to roll over from 401(k) to IRA once you retire and get out of the high fees, so the tax deferral will be more than worth it to pay high investment fees for a few years.
Of course, if you're over the traditional traditional IRA income limit, and even more so if you're over the direct Roth IRA limit (requiring backdoor Roth as mentioned in your post) then I'd wonder why this is even a question and why you're not just maxing everything out anyway?