I was involved in a project to replace the old ICL mainframe circa 2003 (ish).
We looked at the project and we soon found that out what the problem was and still is, that the system has had change upon change upon change upon change for 30+ years and nobody is really sure what everything does and how it fits together.
Also it's not in a nice relational database but in some propriety format that most of the people who knew anything about it had died off years ago.
The changes in govt legislation over the years along with things that needed to be kept going, e.g WW1 widows pensions, meant there was no clear specification to work from, indeed any specification was rubbish as it was incomplete.
We came to the conclusion that this was a very, very risky project, that would cost billions, take many years and have no firm chance of success. Not the sort of project we wanted. I suspect nothing has changed.
Anybody who takes this on, needs big brass ones and a full time therapist.
Anonymous as I still have govt work.