So, I'd tend to agree from the technical perspective. For me I'd also say the BMW is better designed than a Corolla from a technical perspective. I mean it goes faster, accelerates faster, handles better, has better amenities, better saftey features, etc.
So, not arguing with you, but using this to expand a bit...
BMW is notably
less reliable than Toyota. When I search around, BMW's are particularly low in reliability - like 28th out of 32 car companies low - whereas Toyota is generally in the top 5, often listed second after Honda. Breaking more frequently is also a technical issue - just one that isn't listed as important here.
Oh, and as for safety - the Insurance Institute for Highway Safety has eight Toyotas in their 2022 top safety picks - including two Corolla models. They have no BMWs in the list for 2022.
All evaluation of quality of design depends on what metrics you choose to indicate "good design". It also depends on being accurate in one's consideration of those metrics.
I'm fairly certain there's some law or engineering principle that excludes any mas market consumer product from being a technical masterpiece, and if there's not there should be.
Well, see above - what does "technical masterpiece" mean? Isn't designing a thing that you can't kill with a stick a technical achievement? Isn't having high gas mileage a technical achievement? These are qualities of the leaders in the mass market - Honda and Toyota.
We should beware of what we might call "sexy" technical excellence - speed, acceleration, and handling are all technical achievements, sure, but they have little to do with actual use off of a race track. Having the largest payload or towing capacity only matter if you actually move large loads frequently, and so on.
So, yes, it does depend on what you mean by quality. There is no such thing as
general technical quality. There is only a long list of specific technical qualities we are interested in. And if we don't list what we are interested in before we decree what is "good design", the assertion is at best unsupported, and at worst it is misleading.