At a high level, what you are asking is "should my assets be mostly concentrated in some mutual funds or in my primary residence?" I would answer that some low-cost, passive-index mutual funds are usually a much better bet. I am assuming you will always remain a US resident.
You have laid out two options - aggressively invest in your 401(k) or aggressively prepay your mortgage.
If your 401(k) is invested in an appropriate, low-cost, stock-heavy portfolio of passive index funds, then I am confident it is much likelier to be the better long-term investment than your house.
The long-term return on the S&P 500 is around 9-10%, but the long-term average return on residential real estate (i.e. without rental income) is around 3-4% in Case-Shiller. There is lots of variability based on metro area, neighborhood, etc. So you might be in a great area or a bad area and get very different returns (nice areas are expensive to buy, so a good investment is a bad area that unexpectedly becomes good, not an already-good area that gets slightly better). But most of us should expect that 3 decades of owning a home is a much worse return, close to historical average inflation, than 3 decades of owning a few passive index funds.
The main argument for paying off your house is the simplicity of not having a loan. If that strongly appeals to you, then go for it. Some people are very stressed by loans, some people are very happy feeling debt-free, and if either of those applies to you, then the subjective value of prepaying your mortgage is important. Your long-term financial picture is likely to be less robust and lower-growth. So, if you just want to know the financially and mathematically best answer, aggressive 401(k) beats aggressive mortgage-paying. But if you place a personal premium on prepaying debt, then that is a valid choice (akin to consumption - trading future gains in order to consume your contentedness at reducing your debts).
A few other notes on timing and taxes. Timing generally favors earlier 401(k) investments. If you are considering doing a few years of aggressive 401(k) and a few years of aggressive mortgage, do the 401(k) first. Your 401(k) will not grow until contributed, but your home value will change regardless of whether you prepay your mortgage. So aggressive 401(k) contributions in years 1, 2, and 3 is better than in years 4, 5, and 6. Even the accumulating interest on your mortgage is unlikely to cost enough to cancel out the gains that your funds will likely accumulate.
Also, I am not going to wade too far into taxes, but note that completely paying off your mortgage may not be tax efficient, especially if you are high income. But just bear in mind that prepaying your entire mortgage will deprive you of the mortgage interest deduction. Also, if you are high income, then 401(k) pretax is a great way to shave off some tax.
If your mortgage is going to balloon to 10%, then you might look at whether you want to renegotiate into a fixed rate. You can also avoid the balloon by selling before then and getting a new mortgage on your new place. The problem in 2008 was all the people who could no longer evade the balloon by jumping to a new loan or a new house, because their home values had plummeted and credit was hard to find. That is unlikely to repeat in the same way, but there is more risk as you get closer to the balloon that you might, for a variety of reasons, find it difficult to get a new loan - for example, loss of job/income makes you unable to qualify for a new loan.