Yep. several times. A couple at a Fortune 100, the last one wrapped up last month. One particular process I shepherded from paper, to MSAccess (budget denied for 12+ months), to MSAccess + MS SQL (web developer budget denied, db budget approved) to IIS+MSQL ("why is this risk-management process not in a proper application?!?") then from ugly IIS vb to c#. That one was for government audits.
The last one was a migration from MSSQL to Snowflake.
There were also a few that didn't happen that should have and were the triggers for me to look for other employment. ("It's perfectly fine for multi-million dollar engineering contracts to be dependent on a set of XLS macros hacked together by a college intern to drive hydraulic simulations that could result in billions of dollars of damages, why should we spent $5k on a software license for a vetted application?")
Again, that's what due diligence and retention bonuses are for. Been through acqui-hires from both sides.
Just because it's hard doesn't mean it isn't the right decision.
Sadly, management rarely agrees to significant rewrites unless the app is a total dumpster fire.