I’m not sure I agree quality in cars is declining.
I think people need to go and sit in a car from 30 years ago, drive it around for a week and remind themselves how bad they are in every measurable way compared to their modern equivalents.
It's a different kind of quality - maybe durability is a better word? While the fit and finish may not have been as precise and they were generally a bit more utilitarian, things used to be built to last.
Of course not all of it is down to cost saving, safety is a big one - an older solidly built car isn't going to crumple as well as a newer one made with "weaker" materials, so you're sacrificing durability for being able to walk away from a crash which might have killed you 20-30 years ago.
There's also the challenge of making them lighter (or at least not any heavier!) whilst simultaneously getting bigger, which means thinner panels/plastics/lighter materials which may not have the same longevity as solid lumps of steel.
Engines etc. are more precise and to tighter tolerances than ever, to eke out the most performance and economy possible, along with all the added ancillary components for emissions control etc.
And then of course there's the significant increase in electronics complexity for the sake of economy, safety, and driver convenience, which adds many more things to go wrong!
All of the above mean modern cars both have a lot more to go wrong, for it to be more likely to go wrong, and for it to be harder to repair (certainly impossible at the side of the road in the majority of cases!)
But yes, of course there are corners cut and cost savings made in material choice and design.