I think that a lot of it will boil down to what is the best way to react to these kinds of situations for an app that becomes “legacy” based on the guidelines of the article.
If this is a production, revenue generating, application then there are many more variables at play that could affect the overall bottom margin. Both a rewrite and bringing code up to current standards (either adding missing tests, maintaining the application or putting best practices in place) will cost money.
With a rewrite, you may release the software as a new product and sunset the legacy one. If you do not have an automatic migration plan in place, you are basically giving the end users opportunity to shop competitors and may lose recurring revenue.
With maintaining the application, some bad practices may still exist and be a continual pain of technical debt. This could lower morale depending on how bad it is. This could in turn create sloppy code by devs who just don’t care and want to get the job done.
It all depends on the app’s current state and what the best route for the company and clients will be. A rewrite may be the right path, while maintaining the older app might be the right path.