I will be calling the "charger thing" an EVSE. Bear with me. Its job is to tell the car how much current to safely draw, and be a disconnect, and be a GFCI. The actual battery charger is custom matched to the battery and is onboard the car. It's quite large, and obeys the "how much current" signal.
My guess is, it's the socket
I'm not particularly concerned with the socket getting warm - they're going to get warm. But there have been lots of proplems with the socket getting hot. On the "cheap end" ($12) of the spectrum, these sockets are intended for ranges, where they get plugged in once every 20 years and whose load is very intermittent (since each heating element cycles on and off thermostatically). On the high end ($90) they are made for RV parks where they will get plugged/unplugged 3 times a week.
We have a lot of reports of socket damage or burn-ups when cheapie sockets are used for continuous EV loading. And my guess is, with that extension cord, you're doing plug/unplug a lot.
And a test you can do here, if your car gives you a "soft" way to limit amps, is tell the car to take 16 amps. *
Or is it really pulling 32A?
Scuttlebutt is that those "travel EVSEs" draw 32A. That's reasonable because of the above: There is no 40A receptacle (there is a finite number of pin arrangments and NEMA has a lot of types)... so 40A circuits use NEMA 14-50. Continuous EVSE loads must draw 80% of circuit rating, so a NEMA 14-50 dongle plug* should assume 40A circuit and ask for 32A. But wait... watch this bit of a video (at 26:18) of correct use of that EVSE, and 1 minute in at 27:18 it's pulling 40A. So the idea of 32A may be "notional".
What would pulling 40A continuously on a 40A breaker do? Let's look at the trip curve
How do you read that? That is a log-log graph - each scale is logarithmic; each major division is 10x the last. Left is "won't trip", right is "will trip" and gray is "might trip". At 2x overload, trip happens between 9 and 35 seconds.
Well, what happens at 100% "over"load? That indicates trip between 400 seconds and never. Realistically "1.5 hours" is conistent with that; that's why continuous loads require 125% derate (so 32A needs 40A).
So check your car's indication and see what amps it's actually drawing. If it's 40A, that's your trip cause, and that is not a defect. You need a different EVSE that'll tell the car 32A.
* Would 16A even work?
At level 2, 16A is actually plenty for almost anyone who would seriously consider an EV. Even with Technology Connections' very conservative figures, to allow for winter, larger EVs and stuff... that's 100 miles a night. Realistically much more in most cases. And I'm sure you've left the house in the morning with less than a full tank of gas, so even after a long EV day, you don't need to be back to 100% the very next morning. Their treatise on capacity is here.
How do you get 16A out of an EVSE? For casual testing, you can just use any soft controls your car has. If it's for a hardwired installation it must use a UL listed method. With travel-unit EVSEs with exchangeable dongles, see if your manufacturer makes a NEMA 6-20 plug for it - the current signal comes from a microchip inside the plug, and that will say "16A". With wall-unit EVSEs, most are configurable via a UL-approved method.
The extension cord, though.
NEC 110.3(B) requires you install equipment according to labeling and instructions. Your travel EVSE's instructions forbid extension cords, and your electrician darn well knew it. (you, I can forgive). The electrician's job was to school you, and insist on installing the socket where the car will be. Or better, up-recommending you into a hardwired wall-unit EVSE, but that requires specialty EV charging knowledge most electricians do not have, so I can't fault them there.
So yes, either cars should be moved around as needed, or the outlet should be moved, or...
A "wall unit" style EVSE is really the more reliable and versatile way to go. Because that does not require a plug and socket. That can be hard-wired in, which means, plug and socket woes go away, but that's not all. The EVSE itself has GFCI capability inside it, so if the unit is hard-wired, it becomes a GFCI "receptacle". As you might know from the 120V kind, if you have a GFCI receptacle you don't need a GFCI breaker.
So the ideal solution is to extend the wired circuit to a practical charge location, place a hardwired EVSE there, and dump the socket and the "dumb GFCI" breaker. The EVSE's GFCI is "smart" - UL authorizes the unit to self-reset at intervals, as many ground faults will clear themselves over time. Also the EVSE does not lose power when its internal GFCI trips, so if it has internet abilities, it can signal you that something is wrong, so at least you can get level 1 charging going.
Note that most wall-unit EVSEs have DIP switches or other UL-approved setup procedure to be hard-coded for any circuit size, so a "nominally 60A breaker" EVSE can be set for 40A breaker and run 32A actual. (not to be confused with a car's "soft setting" to slow charging at the driver seat or the app. That's not enough for a UL listing.) It's simply sending a different code to the car in each case. They also make wall-units which coordinate with each other so multiple EVs don't exceed a fixed allotment (nice for your 2nd EV), and they make wall-units which clamp your service wires and will slow EV charging to prevent service overload.
But like I say, that's EV specialty knowledge - and most electrians don't have it, and even if they did most consumers would resist such a radical departure from their own idea. It would be perceived as a huge "up-sell".
* On those travel unit EVSEs with swappable dongle plugs, the plug contains a microchip that tells the EV how many amps the plug is. That's what the 4th pin is for (it's not neutral; EVs don't use neutral in 120/240V supply).