Yes.
Although there are also thermostats that have 2 sensors and allow you to do that in 1.
However I don't want to stop the system if the water is too hot, as these boxes are all black and sealed, if the water stops flowing, the pipes would probably melt.