Debt trap diplomacy has been a problem because China was charging near market rates while other big creditors charged low rates for development loans. The Chinese loan contracts typically contained clauses regarding confidentiality of terms and denying the borrower the possibility of renegotiating under the Paris Club arrangement with creditor nations or a similar setup for commercial loans through banks. https://en.wikipedia.org/wiki/Paris_Club
Due to bad publicity the Chinese position seems to be softening.
The rise of the US dollar will make default on development loans more likely, especially since the rising cost of imports (many priced in dollars) will add strain to budgets and the balance of payments.
The real estate issue in China is so big because real estate was one of the few (previously) productive places to invest domestically. The stock market is still more like a casino. Now the central government is leaving it up to local authorities to resolve the unfinished construction, but it's a good question how this will work since land sales by local authorities have dried up, but were previously around 30% of revenues. Also, there is a lot of unofficial debt incurred by local and provincial entities.
In the past, people had a $50,000 annual quota to obtain foreign exchange for use abroad. People would pool with relatives to buy real estate abroad, some in Thailand, no doubt. It's more difficult now with more questions about the purpose for sending cash abroad.