It works in the sense that poverty, especially among the old, has shrunk considerably compared with its 1935 baseline.
Your second paragraph, above, if it shows anything, shows that it fails as an insurance program. It does not show that it fails as an anti-poverty program. As a matter of fact, capitalism by its nature sets wage levels (including the wages capitalists pay that go toward taxes) at a level at which the average worker can afford to save nothing. So comparing social security (which includes substantial contributions by employers as well, and may be financed by income taxes and other sources of revenue in the future) with an individual savings plan is disingenuous when the real comparison is between social security, and no security whatsoever in retirement.
First you say the surpluses are meaningless because social security isn't a separate pot of money, then you say that when the trust fund runs out, social security will be doomed. The fact is that reducing benefits for current or future retirees, the disabled, and widows is ONE option among many for dealing with capitalism's looming fiscal crisis. It is an option that is preferred by the rich because it puts the burden on the poor.