Ok let me make sure I've got this right.
When the water in the tank reaches a certain temp, you want to circulate it. Warmer water goes to the pool, cooler water flows into the tank and when it drops below a certain temp the pump shuts off and the heater does its work. Correct? Then rinse and repeat, so the pump only has to run when its circulating the water?
Assuming that, and using a hot water heater thermostat ...........
The thermostat is designed so that when the sensor reads below a preset temp, a contactor closes and juice flows through to the heating element. In this case though, the juice flows through to a flapper valve installed inside the pipe and closes the water flow off to the pool. Water refills in the tank, and a float valve shuts the water pump off when the water level in the tank is full. Heater heats up the water, then when its hot enough the thermostat opens its circuit and cuts power, gravity opens the flapper valve and hot water flows out of the tank. Water level drops, float valve turns on the pump again and tank refills.