Re: IF Volkswagen can do it ...
The actual cheat is probably pretty easy. Here in California, all ICE cars go on a roller dyno to sniff the exhaust. A cheat system that recognizes that the wheels are turning, but the car is not moving (from the vehicle stability system) could set all control parameters to "clean" during the test. Simple. The emissions test does not care about performance or fuel economy, only emissions.
Obviously, this "let's cheat" strategy had legs fairly high up in the organization. The cheat spans two car divisions of VW, suggesting collusion at the executive engineering level. Let's let it play out....but this answers the question many have asked, "How is VW able to meet EPA requirements with so simple a system when others cannot?!" I strongly suspect that Mazda - I believe they gave up on their diesel for the US - and others have fed suggestions to the EPA on this matter.
All of this says horrible things about Volkswagen management. Heads must roll. One positive outcome could be a more serious leadership commitment to Zero Emission Vehicles at VW, both to meet future mileage and emissions requirements...and as an act of contrition for this very stupid management decision to cheat. Battery electric, or hydrogen-powered could become a focus for VW as it "gets back to work" in a few months.