You could zero out the Pentagon tomorrow and still have to confront the welfare-state arithmetic. Social Security and Medicare alone cost vastly more than defense.

Two things:

1. AIUI even undocumented people use fake Social Security numbers to work. They thus pay Social Security and Medicare taxes without getting any benefits.

2. Social Security is effed because of its structure - current workers pay for current retirees - and the inverting population pyramid. This is unrelated to who the workers are.

Serious attempts to analyze the budget with the goal of addressing over-spending generally omit Social Security, because it's paid for with a dedicated tax. Repealing Social Security entirely wouldn't do much to address the budget deficit, certainly nowhere near as much as naive "look at how bit that part of this pie graph is!" analyses suggest it would.

Actually, the even more serious budget analyses than the ones you've read include Social Security

Because the social security surplus was used to fund the treasury instead of being put towards social security. The 1990s budget surplus that became the Bush tax cuts? Yeah that was the money that was supposed to pay for social security.