lived extremely frugally my entire life and continued to do so while unemployed, combined with being very fortunate with high rates of return in my 401k for the past 15 years
You just pay the tax. 10% early withdrawal penalty plus about 10% federal income tax up to about $50k. Obviously it would be nice to not have to pay that tax at all by waiting until retirement age, but depending on your cost basis and your other income, it's less than you would have paid in income tax at the time of deposit plus short term cap gains at the time of withdrawal if you had not put it in the 401k in the first place. If your previous wage was high enough and cost basis low enough, then it might even be less than income tax at time of deposit plus long term cap gains at time of withdrawal.