...you really don't see what's illegal about you lying in such a way as to scam a company out of thousands of dollars in parts and service? It's fraud - the warranty is a contract, and you're misrepresenting your car's condition in order to have a material gain.
You first said it was illegal to lie about a reflashed ECU -- which it's not.
Now you've contrived a hypothetical situation where the dealer does extensive warranty service on a reflashed car, which you believe was necessary ONLY because of the reflash.
Has such a situation ever been reliably reported -- that a mere reflash WAS SOLELY RESPONSIBLE for such extensive damage?
If it were ALLEGED, has any similar STOCK vehicle -- anywhere on earth -- ever had a similar problem? If yes, you can't say the problem was caused by the reflash. Determining this requires the dealer query the manufacturer's worldwide service database. They often don't have access to this, so it involves a special procedure. The dealer cannot not go simply from his local experience, which entails only a tiny fraction of vehicles made.
The one most potentially at legal and criminal risk here is NOT the vehicle owner, it is the dealer and manufacturer.
Imagine the dealer denies warranty service on the brakes because of reflash. His reasoning is the increased hp combined with ESP/XDS cross braking damaged them.
Then immediately afterward your wife dies in a crash caused by brake failure. In the ensuing legal investigation it turns out the dealer did not do due dilligence and query the worldwide manufacturer database, and that other stock vehicles have had similar problems. He denied service without good reason, and now someone is dead. He and the parent company now face a more serious situation than warranty fraud.
It's true there are cases where a heavily-modified car damages a drivetrain component, and it seems likely related to the extensive mods. Surreptitiously seeking warranty coverage for that would be wrong.
However be advised that dealer that refuses warranty service without doing his homework incurs signficant risk of legal and personal liability.