They also had pension plans, but these days, those are rare outside of government jobs. I wouldn't be surprised if companies clawed them back as the threat from unions dwindled.
https://www.latimes.com/archives/la-xpm-2005-may-11-fi-unite....
A 401k is probably better since the company is paying funds directly to your account, IOW they can't underfund it.
That said, Raytheon ended up fucking over their 401k plan. Raytheon matched in company stock and required that 401k owners held the company stock for 3 years once it was put into the plan. It worked great until 2005 when Raytheon's stock dropped to 1/3 of the price on news of gross of mismanagement. Employees couldn't get out of the stock, and were forced to swallow the loss.
So even on a 401k details matter.
They tend to reward long tenures at companies. Even with government sort-of guarantees they have risk of insolvency. And ultimately it's just not your money.
I also really think that congress should forgo the Roth IRA contribution limits for most people. They're arbitrary and limiting.
Also the penalty for large employers is much smaller than the cost of health insurance (50% to 18% depending on individual vs group coverage), assuming that if companies didn't provide health insurance they'd pocket the difference means companies should still pay the fine.