My company actually wrote their flagship software in COBOL starting in the 80s, and we're only now six years into rewriting everything in a more modern language with probably four years to go.
I can't imagine trying to start such a project like rewriting all of Social Security and thinking it will take months. You have to be a special kind of fatuous to unironically think that.
He's not delusional (with regard to what he's doing). He wins either way. The government crumbles, he gets to remake it in his image. He fails, he gets to claim he made the government more efficient, and the fact that it's limping along is just the result of "necessary" pruning.
This is all theater. He doesn't actually care about the outcome or the American people.