Hi, welcome to Just Answer. I will help you with your question.
Yes, it would be possible to put a payment plan to HMRC regarding this. They appreciate that people do sometimes get in difficulties and they are usually more than willing to assist. They don't like to take steps to make people bankrupt and/or enforce for the monies due if they can avoid it, so be as sensible and realistic as possible in your proposals.
If this fails, then it might be possible to look at putting together a formal IVA, individual voluntary arrangement, which would bind all creditors including hmrc.
You would need support from 75% (by value) of your creditors to make this work.
This would allow you to pay off all your debts over time and nobody could take action against you whilst the IVA remains in place. This would allow you to avoid bankruptcy.