What VW did was to take a clean-burning car and disable the pollution controls under normal driving conditions, for performance reasons. So while to the consumer it seems deceptive that VWs get better performance than they should, given how clean they’re supposed to be, in reality the cars are illegal and spewing toxins they were supposed to be removing from the exhaust. This makes the cars not only a pollution source but a health hazard to people living nearby.
To get on the same level of VW, the water heater would have to be doing something like emitting low levels of carbon monoxide into the home while having a feature that avoids doing that in the laboratory. In other words, reckless and willful disregard for human health and life.
Also, for the water heating one, there's a plausible reason for the regulator to care about the discrete measurements rather than the total amount of thermal energy in the water. Hot water at the top of the tank is more valuable, because it's used first and less likely to be wasted, so you could wait it more heavily in a test. There's no parallel for the VW test cheating. No indication that's what happened here, of course.
What placement of components would be ethical? Should engineers required to be separated from the test parameters by a Chinese wall? Do they need to build the system for the worst result? Some middle ground? If the engineers are unethical, where is the line?
The obvious answer to optimizations like this are for the testing body to tweak the test procedure based on what manufacturers do over time. That provides an incentive to be more conservative or accurate.
We don't have to. In this case we have clear admission of intent. The intent to deceive is what makes it fraud and not just being wrong.