What people intended them to be and what they ended up being aren't the same thing. Their intention may have been to replace pensions, but that didn't work. You can argue and debate this all you want, but that won't change the fact that the majority of Americans are now unable to retire because they do not have enough money saved up.
I will give you that the retirement stats might be a bit skewed though because those numbers include people who never got a college education or other post high school certification (like becoming an electrician or something). I'd be interested in seeing what the retirement numbers are for college graduates, people with other professional skills, and non-college graduates.
It did work and in fact it's better. Not every company had a pension and those pensions weren't always that great. With 401k's there are more people being able to save for retirement. Prior to 401k's only the people working for a large company would get a pension and have a retirement plan, now everyone can.