If it’s larger than 40A @ 240V, you could buy a 120v astronomical time clock switch and use the output of that as the input to a 120v control coil for a contactor sized for your water heater.
Per @quickthrowman recommendation I can add that this is the way to go for an electric hot water heater having installed many of these Intermatic time clocks. The old ones were analog and one can hear a clicking but they do make them digital now, YMMV.