I think the US is going to have a complete collapse of their economy so there is no way to rescue social security or Medicare.
But If we are talking about the future and starting all over instead of giving money into a trust fund operated by the government I believe it should be a trust fund where your contribution with each paycheck goes to purchase shares of a ETF S&P 500 fund, a Russell 2,000 fund, a corporate bond fund, a REIT and a government bond fund. The purchases for the entire fund each month should be publicly available, and every State's AG should be considered a member of the board of trustees on this fund that has full access to all records. Meanwhile each person should be able to put in their identifying information into the website and see what their holdings are. In other words it should be treated like a 401k, but it should not be buying any publicly traded funds like Blackrock or any other firm. Instead the purchases would be handled by a separate quasi government office (sort of like the Post Office). With AI, computers and the size of this fund the fees should be less that 0.1%. These funds will become major share holders in several thousand companies so you would need the comptroller of every state to sit in on a number of boards of these companies that they own. You do not want this thing run by the Federal government, with 50 different states involved and with various unions going to the States office to help their members keep an eye on this fund.
You should therefore be able to borrow against your Social Security account the same way we have people borrowing against their 401k. You should also have the option of having your 401k contribution going straight into this Social Security account.