So, the rewrite was a failure because the new team was smug, very smug. They were in Hong Kong, elites of Asia, trying to rework the "shit" done by the remote guys, and so they... well they over-engineered a monster from scratch in Grails (argl, I nearly died, having joined to do Java), and were hitting the limits of their Grails abilities (no tools, no debugger, no experience, no support, a new version just out the month before they started that change all documented paradigms, an architect who only wanted Grails and nothing else and didn't care whether the product did anything or not).
So well the thing we did to eventually move the mess to production (so we have a dying Philippino software we can't maintain because we fired all the devs there prematurely ofc, and a 25% done product in a state that's going to the wall even faster than the old one):
- Unsmug the team: teach them Grails (sadly, I was... the most experienced grails developer myself, against my will, having been a victim of it in all my previous jobs), isolate the most damaging devs
- Re-hire the PH team and move them to Hong Kong to fully maintain the old software, for 2 years, while they also learned Grails and moved to the new system with their precious new skill (they never thanked us, weird)
- Learn the old system: respect its decision algorithm that were not simple, understand why it was slow/ugly/messy whatever, rather than say it's because the devs were inferiors: we slowly realized they were not
- Slow move everything to the simplest possible technology rather than beautiful one-pager bullshit like Grails or Angular or whatever.
So my advice to you is: embrace the fact you will not do better. You will do worse or the same. Rewrite for a business reason, and if possible smaller parts. Do not be so smug as to say "bloated code" or "without any planning for a maintanable design". All it takes is 2 months of money making pressure to entirely destroy any code base, and guess what, people will want your software to make money, not just be beautiful.