That’s how industrial VFDs do motor overload protection, they just keep track of heat accumulation (based on current) vs dissipation (based on fan speed) and fault when a threshold is reached. Probably there’s more nuance to it, but that’s the gist of it.