Make it illegal to sell loans, mortgage or any other sort. The sub prime meltdown happened when the banks (or loan companies) who issue loans started selling the loans for cash. This freed the mortgage issuers from all risk and restocked their supplies of cash, so they could run out and do more mortgages. Which they did. The issuers make their money on the closing costs, so the more closings they do the more money they make.
Mortgages are creations of the law. We could pass a law saying that no one can sell a mortgage. The mortgage is a deal between a specific borrower and a specific lender and the deal is not an article of commerce that can be traded, sold, or given away. The legal rights to enforce the deal (foreclosure on the house) are only enjoyed by the original issuer, second hand mortgages loose their right of foreclosure.
The idea is to kill off the juggling of mortgages from one hand to another. You issue it, you own it forever. Issuer's will be much more careful who they loan to, and on what terms, if they have to live with the deal for 30 years. When the issuers can sell the loan, they don't care how sound it is, it just has to be sound enough to last long enough to sell it off. This accounts for the teaser mortgages, low payments for a couple of years, much higher ones later. The borrower probably won't default until his payments go up, by which time the issuer is home safe and some gullible investors get hurt. And the borrowers, and the entire economy too.
The issuers will cry and wail at this proposal. They will say they need to sell the mortgages to get the money to do more mortgages. Let me say this to them. Raise money the old fashioned way, pay decent interest on deposits. Sell certificates of deposit that pay 1% less than the going mortgage rate. With mortgages around 7% the CD's could pay 6%, and have FDIC protection too.