Any current owner of their residence should be able to “sell” their own house to themselves – and the new mortgage must be kept by the bank that refinances the transaction. It can never be sold to another institution, unless that company is in bankruptcy. The price of the “sale” should be negotiated between the (new) bank that will be financing the renegotiated deal, and the current owner/resident of the property.
The current owner can select the bank that they want to deal with: they should be able to choose between the current institution, and any other local bank i.e. a bank that has a local office. The banks that want to underwrite the new renegotiated loan would be competing to make the new loan.
So, if the current holder of the mortgage wants to keep their investment, they will have to negotiate a fair (current) price for the property, and the owner would have to qualify for the new loan under reasonable and transparent rules; that are set by the government.
If the institution that is the current mortgage holder is refinancing the renegotiated mortgage, then the government doesn't need to pay out anything.
If the new renegotiated mortgage is being held by a new (local) bank, then the government can split the difference 50/50 between the old and the new mortgages, or pay half of the original mortgage, whichever is less, to the old institution; sharing the losses.