This isn't how demand actually works.
Say WotC makes 50% profit on a book sale.
Say they make closer to 80% profit on a sale of a month of DDB subscription.
Now, every time someone buys a book instead of buying a DDB subscription, WotC makes less money off of them. This could even be true if the DDB subscription is cheaper than a book sale. Fewer raw $ coming in from books than from DDB.
So the thing a profit-seeking company is going to do is drive everyone to DDB subscriptions. Give incentives for them. Design for them. Funnel people in that direction. Set up the flow of dollars so they flow more to DDB. If the subscriptions cannibalize the book sales, they make more money without having to make a better product.
If that effort is successful enough, we could see the books getting
worse. Because they're not as protifable, see. So why invest in high quality print runs or big glossy artwork or expensive binding? They're not worth as much money, it's fine if they're not great products - better, even, since that'll drive as many people as possible to DDB.
And maybe then WotC books get a reputation for being trash, or for just including reprints of the stuff you already get online, or for being superfluous to the D&D experience when the online subscription gives you
so much.
And maybe they keep publishing books for a while out of a vague sense of obligation or because there's enough grognards who buy cheap books to keep a thin trickle of money coming in. Or maybe they stop because really the books aren't great these days and everyone plays online anyway, well everyone who matters, anyway, everyone who spends money on the most profitable products, anyway.
I don't think we're really there today (books are still the main thing), or really on the path, but I do think we could be there in 5-10 years, if the pressure to monetize is there, and if the people sitting in decision-making seats get super into maximizing profitability for D&D specifically. And, maybe crucially, if the online product isn't tooooooo trash.