Wolfdog-
In essence Social Security already does what you suggest. The Social Security taxes people pay are invested in government bonds already. They are earning interest at a good rate, and Social Security runs very efficiently so there is not that much cost in terms in that regard.
Social Security is a wonderful program, it provides a number of benefits at low cost, disability, survivor benefits, retirement benefits. These benefits are rudimentary, but they are enough to alleviate a great deal of human suffering, and prevent what would be a much more costly burden on society if the millions of people who benefit from the program, after at least partly paying for it themselves, had to be taken care of some other way.
In fact, look at the tremendous growth in productivity in the last century, there are many factors for it, but some things which may have contributed greatly, are overlooked. I would suggest that things like Social Security, civil rights, and enviromental protections, are some of the things that helped produce that increase in productivity, and we screw with them at our peril.