Thanks for the explanation of how the unit operates.
As best I can tell from those photos, the triac controls the pump and both the relays are involved in the circuit that supplies the heater.
The outer relay clearly controls the heater, but the function of the inner one is not clear. It is...