Ah, so if you had compared the Model 3 to a similar-segment petrol car such as the Mazda 3 (4-door), it would be the other way around and the petrol car would come out $10k cheaper in TCO. The Audi A4 is only that expensive because it's a premium segment sedan, the Model 3 is (by design!) not a premium segment sedan.
To clarify, I think you're not comparing "electric car" with "petrol car", you're comparing it with "petrol car for which I happened to pay a $20k premium because it's a status symbol".