You want to put your code in escrow, and have an agreement that if your company folds, the customer gets full access (not necessarily ownership) of the code, and has the right to the engineers' time necessary to get it and keep it working.
These sorts of things are standard in some industries. Get an hour of free consultancy with an appropriate lawyer, and it will work easily. Talk to your customer and say that you are sufficiently confident to give them full access to the code in the event that you can't deliver. They get the full blast of your confidence, as well as the assurance that it will all work.