It sounds like you might have a bad fuel pump. Normal engine temp should be around 200. That's usually the center of the gauge for most cars. (200-210) Electric fans usually start up around 220 and up. that should not affect the fuel pump making noise. If you can tell when the car is going to stall, drive with a fuel gauge on the vehicle and see if the fuel pressure drops when the engine stalls. The fuel pump is just an electric motor. Some make more noise than others. But, if yours always make more noise just before it stalls, with a fuel pressure gauge on it you can see if there is a problem with too much pressure (sticking fuel pressure regulator or something blocking the pressure) and that's why it's whining or it whining because it's dragging (making it hot) and will get slower until it stops running. After it cools back down it will run again.
A shorted furl injector will also cause an engine to shut off when it gets warm. An injector could run fine when it's cold but when it gets hot short to ground and take all the voltage from the other injectors killing the engine completely. https://www.youtube.com/watch?v=41SZexc_ieE