I'd have to go fishing to find the older threads on power limiting, but I thought we'd gotten fairly persuasive evidence that the rotor was the main limitation, with some indications that Tesla was using a power/time lookup table instead of actual temperature measurement to protect it.
That's probably why the D cars are so much more capable with the same battery packs - more motor cooling by having a second motor. Of course, then they got more power, which means more heat...
(Directly measuring the rotor temperature is somewhat challenging - I think I would probably do it by calculation from the flow rate and temperature rise in the coolant through the motor, or by infrared thermometer.)