Although I do very much like this idea, I don't think this is a deal that is going to work.
The first and biggest problem with this proposal is that you do not legally have the right to assign your Social Security Benefits, nor can your creditors seize them/put a lien on them (the Federal government may be an exception to this for taxes -- I think the government will also force you to pay Medicare Premiums out of your SS check). This means that it would be impossible to enforce this kind of contract. Somewhat of a "loophole"/exception to this is that once you receive the funds, the money would be considered to be part of your general assets, and could be seized as applicable -- so if there was a lien on your bank account, and you deposited your Social Security check into that bank account, then the creditor that has the lien would be able to seize those funds once the check clears -- you can however receive a paper check and cash the check at say WalMart. There are similar protections for your other retirement accounts (401k, IRA, ect.) however there are somewhat more "loopholes"/exceptions to this.
Somewhat less of an issue, is that the Social Security Trust Fund does not actually invest or manage your money, it actually puts all of it's excess money in special treasury bonds that can be redeemed at any time when needed. Also the (what is essentially) rate of return assumes no risk of default which means the return is going to be lower then it otherwise would be. If you were to invest this money yourself, then you would (presumably) take on some amount of risk which means that you could potentially end up loosing some amount of money.
Starting with your last point first, yes the rate of return risk could be an issue to me if it wasn't the defacto standard to operate the US banking system as too big to fail.
As for whether this "assignment" of SSP will be permissible, the loop holes to a direct assignment that I can come up with off the top of my head based on the operation manual on assignments from the social security administration linked above are very clear in allowing pre-authorized withdrawals for loan repayment.
Finally for medicare the premiums are not allowed by law to increase faster than the social security benefit its self, and payment can be made in several alternative ways than a benefit deduction.