401k plans are a scam not because of what they are, but what they replaced.
Companies used to offer pensions. These were retirement benefits that were handled by the company, and the company bore the risk of underperforming markets.
For a number of reasons, pensions were much better for workers. Now, only some unionized workers get them.
There's so much inflation these days that pensions are impossible unless the pension money is invested to keep up with inflation. So it's the same thing at best out a worse option.
In my country, 401(k) is rare. My wife's company is one of the few that offers it, and it's way better than the government pension my dad is getting as a retiree, which is like less than $200 a month.