I’m not saying to put 100% of every liquid dollar you have into the market, but in your 40s, I think it should be the majority of your investment funds.
Boglehead advice agrees, with an explicit principle of “Never bear too much or too little risk”, suggesting 30-40% bonds in your 40s and the rest in stocks.
I think more people underperform from being too risk-averse than under-perform from having too much equity exposure and having an unfortunate overlap of a large expense and a downturn in the market.