Not at all. These businesses don't exist for the reason you suggest they exist.I think you are overstating the risk somewhat.
1) Not all loans have LMI
2) The LMI Insurer is not responsible for all the debt, only what cannot be recovered by sale, (even then they can still come after the borrower last time I heard)
3) You are assuming that LMI insurers are totally stupid, i.e. are totally unaware this is a risk and haven't put risk mitigations in place, e.g reinsurance of a significant part of their portfolio to reduce risk
Not suggesting there is no risk, just that it's not quite of the magnitude you suggest. A full on market debacle like the GFC sure, but I'm more confident than you they could ride out the current market stress.
They are simply an outworking of the fact that regulators require insurance companies and banks to hold different amounts of capital for identical risk profiles, simply because one is a bank and one is an insurance company.
For years banks were allowed to fully own their LMI insurer (called a 'captive' insurer). Loans were written by the bank, the 'insured risk' transferred to a wholly owned subsidiary (the LMI captive) and then the capital requirements for the group became substantially less. The risk for the group wasn't less, just reapportioned from one subsidiary company called the 'Retail Bank' to another subsidiary company called the 'LMI Captive', but it allowed them to hold significantly less capital.
I know the LMI insurers aren't totally stupid. They understand that the banks are simply 'renting' their statutory capital at a cheaper rate than they could get by holding capital themselves. But they're also very cyclical businesses, making a lot of money across the majority of the cycle before facing the inevitable in a downturn. There's a very good reason why there's a lot less LMI insurers now than there was 30 years ago and it comes down to a question of survivorship.