I'll start by apologizing for not knowing anything about anything in this arrangement, but I did read a little up on that Shelly relay.
If I understand right, you are just using the Saltwater Generator (SWG) while the timer is active? The timer triggers the relay through the switch input (SW) and that causes power to turn on the output terminal (O). I assume you are using the Shelly with the input in switch mode so that it is on when the timer is on and off when the timer is off.
The issue you are having is that the SWG is still on even after the timer has turned off? It almost sounds like perhaps the settings are not in switch mode and are instead in button mode. My understanding is that it would cause the SWG to turn off-on or on-off for every full off-on-off cycle of the timer.
Hope that helps a little!