What will we do with that fab in two years when nobody needs that excess RAM?
Sell it at lower prices. Demand is a function of price, not a scalar.
I suspect there will be a shortage of something else then…
And regardless, you could flip it around and ask, what will we do in x years when the next shortage comes along and we have no fabs? (And that shortage of course could well be an imposed one from an unfriendly nation.)
There has never been 'an excess of RAM', the market has always absorbed what was available.