"They won't go bankrupt" and "The demand for their product or services will increase over time" are not strong fundamental reasons to invest
Just as much as the stock market is not the economy, a company's stock is not the company. A lot of the justification for "value investing" in stocks that have been spiraling down in value over time is that the companies are invincible/too big to fail, the demand for their product is inelastic, they will "weather the storm" of any economic downturn and "will still be here 30 years from now". These are in not strong reasons to invest in a company's stock. A company can survive just fine while its stock price still plummets/multiples compress due to market mechanics, fiscal policy, innovation, competition, any number of other factors.
The question you need to be asking when you think about whether you should jump on the value investing/defensive sector bandwagon and buy stock of a company like Johnson & Johnson or Waste Management isn't "Will people still need to buy diapers 30 years from now" or "Will people still need the garbage collected in a recession". The questions you need to be asking are what are the growth prospects of the company, how much debt does the company have, how effectively are they deploying capital, how effectively are they returning free cash flow to investors, what do their financials look like, is their current dividend yield competitive with the risk-free rate, if applicable, what is their dividend payout ratio and can they actually maintain their dividend/dividend growth during a recession.
The question you need to be asking when you think about whether it's time to classify AI datacenter hardware suppliers as "value stocks" or "long term holds" isn't "Is AI going to change the future" or "Is AI only going to grow from here". The questions you need to be asking are how insulated are their profit margins from competition and efficiency innovation, do their next-quarter earnings guidance imply accelerating or decelerating growth, do they have massive capital expenditure bills that will both reduce free cash flow and decrease their scarcity advantage, and what is your exit strategy for choosing an opportune moment to sell.
The question you need to be asking about buying Google, Microsoft, etc. are not "Will people still be using their products and services 30 years from now" or "Will these companies survive through an economic crisis or a debt crisis". The questions you need to be asking are do these companies' forward trajectories change the way their balance sheets look, will these companies continue to issue debt and dilute shares, are you comfortable with the price you would pay for the stock if you bought it today relative to how such companies' stock prices actually perform during an economic crisis.
Some people say time in the market always beats timing the market, but if that were true, Wall Street would have no reason to exist and there would be no reason to even open up stock markets for ordinary people to invest. From the first 1900BC futures markets in Mesopotamia and the first 1602 stock market in Amsterdam, markets' main purpose across history was always to transfer and consolidate wealth from the poor to the rich. Always invest according to numbers, don't allow yourself to make investment decisions based on narratives that sound convincing but have no relevance to how the price of the stocks you buy perform over time. Your goal is not to be right about the fact that the companies you invested in survived a recession, your goal is to make money.