So I am still better off investing in my 401K and paying a 3% fee rather than investing in a non tax advantaged account and not paying the fee but having to pay taxes, right? Am I thinking about this the right way?
It depends. Long-terms capital gains in non-tax-sheltered accounts are actually pretty tax-sheltered, so if you can come up with the whole $18,000 you're allowed to invest in an 401K in one year, put that amount in a regular (not 401K) investment account, buy a cheaper version of the fund -- you'll be better off in the long run.
OTOH, if you won't (otherwise) be able to invest the full $18K amount or close to it, you're quite possibly better off going with the 401K, since you'll be able to invest more up-front, though you'll also have to pay regular income tax rates (not capital gains rates) when you eventually take the money (and earnings) out.
Of course all this assumes tax rates stay the same going forward, which is unknown.
Having fun yet?
TL;DR: If the up-front tax savings lets you invest a higher amount, go with the 401K, fees or no. If you're rolling in dough and can invest the full $18K regardless, invest it outside the 401K in an index fund and hold the fund (at least) long enough to get the benefits of paying taxes on those funds only as a long-term capital gain.