Predictions of Social Security and Medicare solvency reflect the distorted demographics due to the baby boomers. The ratio of workers to retirees will decline dramatically as the baby boomers retire.
The easy solution is to change the demographics by increasing the number of workers. This can be achieved by allowing enough foreigners to work in the United States on some kind of work visa. These foreign workers would pay enough US taxes to keep Social Security and Medicare solvent, would not be citizens, would not vote, would not be entitled to remain in the United States indefinitely, and, best of all, would not be entitled to Social Security or Medicare payment themselves.
Rather than building fences to keep foreigners out, the United States should be encouraging foreigners to come here and work.