I have a 6-50 outlet for welder use that is limited by a 40 Amp breaker. To get around a truck in the driveway, I used the welder's extension cord. After a few months I got a drop in current to half. There was a message in the notices saying there was an overheat at the plug.
After a bit of experimentation I found I could charge at up to 28 Amps, but no more before a trip to half power. None of the building wiring was getting warm. Just the extension cord end was getting warm. So I used it at only 20 Amps charge rate, which was a bit faster than the 16 after a trip. The car could then understand the right time to start charging to be ready at X time.
I've since replaced the extension cord end with a good Hubble one. It cost more than the extension cord originally did.
So.. Don't know how much of the thread you've read through, but the Tesla Mobile Connector (TMC) maxes out at 32A. This may or may not be Tesla cheaping out; turns out that the NEC (as you've discovered) allows for a 40A breaker, 40A wire, and a
50A socket, a NEMA14-50, as you've discovered. The apparent reason for this is that 50A wire is expensive, electricians run into 40A loads from time to time that could use 40A wire, but there's no NEMA connectors in existence that are rated for 40A on the nose. Since a TMC can't tell if it's got a 50A circuit or a 40A circuit, in the interests of preventing House Fires (not joking) it's thought they assume the smaller current circuit; the max draw (jiggered into the TMC) is then 80% of 40A. And that's 32A.
As far as the heating.. The general Tesla rule is No Extension Cords. With 120 VAC circuits, this is pretty obvious: The "Heavy Duty" extension cords that one finds at Home Depot are only "heavy" in that they use a lot of plastic, but as little copper as they can get away with. Plastic being cheap and copper being expensive.
In general, when one uses copper, copper has resistance, and the resistance is greater the thinner the wire is. Let's say the resistance of the extension cord is R.
The voltage drop across the wire is going to be 2*R * Amps (There's a "2" in there since there's one drop from the socket in the wall to the other end of the extension wire on one hot, and the same drop from the end of the extension cord on the neutral/other hot back to the socket.). A Tesla will happily measure the voltage when first plugged in with no current flowing (and no drop), and remeasure under load. If there's 'way too much drop, it'll simply not charge; if there's some drop, it'll reduce the current draw, in the interests of Not Catching Things On fire.
On Fire? Yeah, well, to a first-order approximation, the power dissipation in the extension cord is P = 2*(R * Current). Put your hands on the cord for a running vacuum cleaner and, yup, it's warm, and That's Why. If one gets the wire in said extension cord hot enough from this, one can cause the insulation to either burn (bad news, but not typical) or simply degrade. "Degrade" means the plastic insulation is breaking down and, when it finally goes, blowing breakers/house fires R Us. None of which is good for one's health, especially if one is charging overnight and is asleep.
Along those lines: Suppose the insulation finally decides that This Is The Evening That It's Going To Die. It gets hot enough to trip the TMC, which is nice, and the TMC goes off, which is also nice. Fine: The TMC is off, but the
insulation is leaking current. And you've got a 40A breaker on this thing. Suppose 8A at 240VAC is what's leaking: That 1.92 kW right into the copper wire. We're going to get flames. Suppose this thing is lying up against the wall. The wall catches fire. Without a single breaker being popped. Um. This is a hazard to life and property. I'm saying this seriously, now: It's one thing if you risk your
own life in the dead of night by not having a decent extension cord, but what about your loved ones?
Seriously, given that you're playing literally with fire, I would strongly suggest ditching that extension cord and finding one that is Truly Duly Rated for 40A for the length of wire. And not just intermittent use by a welder.
Or, even better, getting an electrician in there to move your 40A socket from wherever you've got it close enough to the car that you can use the TMC sans issues. Yeah, it might be a couple hundred bucks. But how much is your life worth?