401k is tax wise pretty much always superior to a brokerage until you can guarantee 47.1k/year in retirement, and still relatively better until you can get like 191k/year in retirement in it, which obviously is a lot more than 99.99% of 401ks.
The difference after 47.1k isn't that big generally...