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.
It does hold government debt, but that's not really useful and puts it in a totally different category from "spending that contributes to the budget deficit".
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.