Their risks are none. They are not increasing capacity, only selling the available one to the highest bidder. Whenever these AI companies run out of money, these producers can simply resume their regular business.
Not sure about DRAM companies, but many businesses would still go under if they sold their annual production to a company that then goes bankrupt and won't pay anything for the delivered goods.
It only depends on whether they get addicted to the high prices.. as long as they can withstand a collapse in the prices then you're right they have minimal risk