What happens if the pension fund goes bust? Like if they invested it all in crypto and it went bust? Crypto is just my example of obvious extreme
They don't have to invest in crypto to go bust. Pension funds have become insolvent before.
I think what frequently happens is this. The pension fund realizes, long before it actually runs out of money, that it is going to run out of money. At that point they usually alert the pension beneficiaries, and quite often what they do is to reduce benefits to decrease the likelihood that they go bust, until they can either get more employers sending employee money to them, or until they can get better returns (maybe invest in the next hot crypto??).
The other thing is that I think in the past the Feds have stepped in and provided some funding to help out insolvent pension funds. They may have even done something like a "pension fund FDIC" or something to provide some certain level of guarantee, although in all likelihood you would never get the full benefit that you expected to get.