I would have been far better off if I could have invested those funds myself instead of being forced to give them to the federal government.
You're missing the intent of the law. It was set up as a safety net for the elderly etc.
SS stands for OASDI. Old-Age, Survivors, and Disability Insurance
And you'd miss the 100% match that your employer has to contribute.
401Ks and pension plans are also set up as trust funds however there have been some notorious employers who have robbed from both leaving their employees screwed.