I know of a brilliant product called Requirements Assistant. One man spent decades building it. It did an extraordinary job of finding omissions and inconsistencies in software requirements specifications. Then he died. It was written in Prolog (a rarely-used logic programming language associated with artificial intelligence and computational linguistics) and there was no architectural or design documentation so no one could take it over. In the end, his son couldn’t even give it away.
We all get stuck into doing the fun stuff (coding) and neglect the paperwork but always have a Plan B. That includes architectural/design documentation and your credentials plus someone who knows enough about the app to continue it or sell it.