As a half-engineer myself, I have to say this: people need to be reminded that it was engineers that were at the highest levels, CEO and down, behind Dieselgate and, yes, the issues at Boeing as well. Engineers are not per-se better at business ethics or corporate governance. Greed is universal.
Dieselgate was akin to a student learning the whole geography syllabus just before the exam, then getting a top score and claiming to be good at geography.
Just because you learnt the exact topics that were to be examined doesn't mean you're good at the whole subject.
Likewise, those diesel cars were very good at the exact things that were tested, and terrible at everything else. They were literally engineered to the exact test syllabus.
Yet we somehow don't call the student a cheater.
In my view, in both cases, the shortcoming is with the test/syllabus designer. The test topics need to be not announced beforehand, and the sylabus needs to not be rigid and narrower than the field in the real world.
Fact is, VW engines had a mode recognizing a test and adopted AdBlue and fuel mixture to meet emission standards. On the road, these engines ran dirty. That was explicitely stated to be illegal in the applicable laws.
It was all the other brands that played, as it turned out also illegal, games with temp windows and such.
Blaming this on regulators is putting this while story on its head.