I just bought a second house as a rental, and I saved up the down payment mostly in a mutual fund, but also goofing around a bit in some stocks just to see if I was a genius investor (I am not).
The market did what it did, when I had enough to buy the house I did, if the market had been down it would have happened later, no big deal. If the market had crashed completely then I'd have been up shit creek along with everyone else, hoping to stay employed through it and possibly losing a great deal if I was forced to sell in a distressed situation.
So OP worries about a down turn or a housing crash or whatever.
Scenario:
You put the money into your current mortgage.
Local market crashes, that money is wiped out. You are able to find a buyer for your house and are able to pay off the loan, recovering no equity. You have no money from that transaction to have a down payment to another house. So of course, you wouldn't sell your house, cause you have to live somewhere (assumes you can afford to stay in your house).
Or
National market crashes, your market does not. You are able to find a buyer for your house and extract equity plus a lil sumthinsumthin. You use some for a downpayment (more than you intended, because your local market went up since you started saving), and use the rest to invest, buying while everything has crashed and is low. This is the best case scenario for the "put money into your mortgage so-called guaranteed return philosophy).
You keep the money as cash.
You save up cash, foregoing possible investment returns in favor of certainty. It maybe takes longer to save up this way, but certainly you will get there eventually. Once you have enough to pull the trigger on your transition, you do it. This is a solid plan, and there would be no shame in doing it. It is very conservative, it is very simple. It is not as efficient as it could be, but nothing wrong with that.
Or
Some market crashes, national or local, and your cushion of cash allows you to stay put and ride it out (or invest a huge amount right after a crash). You end up in really good shape once the recover happens, and by being flexible in your plans, you ended up in a really good spot.
You invest the money in the market:
The market goes up, it takes you less time to save up that down payment.
The market goes down, it takes you more time to save up that down payment.
There is no right answer, there's just how comfortable you are. I was comfortable delaying my plans if the market tanked, because if the market tanked I wouldn't want to be making big changes anyway.
In general, after having been someone who aggressively paid down a mortgage, the liquidity sacrifice there caused me to miss out on some things, and so I wouldn't do it again. I would avoid a mortgage altogether, or pay it off according to the terms. Extra payments, I understand the logic, but the practice just doesn't make sense to me anymore. I could see that last year going ahead and paying it off, or if I had a huge lump sum come in and realized I could just eliminate the mortgage, but once I stopped being someone who would just blow through any cash I had in my account, sequestering it in home equity just doesn't make sense to me.