This may never happen
1. China is converting as much of there funny money Yuan into Gold as possible. This helps bolster the idea that China can pay their debts. https://bloom.bg/2I5TYME
2. China monetary policy is run through banks. When a bank is to far insolvent they will make bad banks and put all of the insolvent loans into those. https://reut.rs/2WvG2zb
3. When China has enough gold to give external investors confidence they can sell off half of their Treasury holdings, create the good / bad banks, and re-engineer the economy. Leaving foreigners on the hook. https://bit.ly/2H7zdxf, https://bit.ly/2vOA1li, https://s.nikkei.com/2WgZRuD
4. The world wants cheap stuff. While foreigners will be unhappy they lost their investments they will keep buying from China and China will have a soft-landing from this upheaval.
5. China won't at that point be able to afford to buy any treasury bonds. The US Treasury will be forced to print money and inflation will go up along with various problems. This will force investors back into China because the US doesn't look like it is any better off then China is. It is a lot like someone who declares bankruptcy being able to get credit again pretty quickly.
6. To make sure productive members of China's society work China could make less productive members into caregivers helping to relieve some societal stress.
7. China's government owns part of a lot of private and public companies along with China Utilities. They can raise money by privatization like France has done. https://on.ft.com/2lN2x1F