One of the perplexing issues in software solution development is who owns the code? The client may want it to protect their company from a lost investment if something happens to you and they need to make changes. If you develop software not as an employee of a company, the software belongs to you. This ensures you have right of first refusal on future enhancements, but relying on your perpetuity will make your clients nervous. You should come to some agreement in the contract negotiation phase.
There are software escrow companies who act as intermediaries. A search on the internet for "software escrow" will identify many options. Here's how it works. An escrow account is opened. These are often paid for by the client.
Prior to depositing the software, you and the client create a deposit agreement which governs the conditions of its release. Those conditions could include a request from you, the developer, because the client wants enhancements or from the client because the system has crashed and you are no longer in business.
Once you develop the software, you send the code to one of these companies who will safe keep it for both you and the client. (This also provides a valuable and reliable back-up process for system crashes.) If either of you need the software, requests for a code release consistent with the instructions in the deposit agreement can be fulfilled.