For those looking for some relatively light financial reading related to the question of "how does one escape this?":
Morgan Housel (a writer at the collab fund) has written about how cycles of boom and bust are inherent to markets.
https://collabfund.com/uploads/Collaborative%20Fund%20--%20T...
The first section "1: The Inevitability of Insanity Among Sane People" is probably the most relevant, and a more summarized version is from Housel directly: https://collabfund.com/blog/the-laws-of-investing/
And another great level-headed financial writer Howard Marks has a great "memo" about how bull markets (sometimes read: bubbles) rhyme. Specifically the section "Optimistic Rationales, Super Stocks, and the New, New Thing".
https://www.brookfieldoaktree.com/sites/default/files/2023-0...
I can't find the exact quote, but I feel that one of them basically once said that you wouldn't really want a market to not have bubbles, if something didn't have the ebbs and flows that financial markets have, there wouldn't really be any room to find niches or to innovate because innovation requires risk, and risk inherently destabilizes any existing stability (re: the first article).