Main problem is the 13 amp fuse, for a fuse to rupture it needs the melt the wire inside the cartridge, so must produce heat, so any 13 amp socket should be in free air to remove the heat, a 15 amp socket does not have a fuse, so runs far cooler, as does a 16 amp socket like used in many other countries of the world.
But because the fuse is only in the live, neutral must not be fused, in the UK getting line and neutral the right way around is important, so you can use French plugs and sockets, but not German, and even the French have moved to the German Schuko socket, so getting a plug and socket which is non reversible is a problem, we could get the German sockets easy enough with timers etc, but in an airing cupboard is hardly free air, so British 13 amp is not really an option.
The immersion heater takes hours to heat 40 gallons at 15ºC to 65ºC with 3 kW will take 3h 32min, but normally the thermostat will switch on at 55ºC and off at 65ºC so down to 43min, which means it does not heat up the plug so much,
calculator here so as long as not switched off, the time the heater is on is much reduced. Only when running a bath will one be looking at hours, as long as water not allowed to cool.
The reverse is true, to cool 40 gallons of water will take time, quite a long time, my boiler switches on 4 times a week for ½ hour, well only actually runs for 20min which is enough to have hot water in the taps to wash hands, so since it takes so long to cool, having it on a timer if there is a thermostat seems pointless, only reason I have it set for ½ hour is I have no tank thermostat connected to the central heating, so it would be cycling on/off all the time keeping the pipes warm.
You could of course use the timer to limit the one time, say 15min on and 45min off, but that seems pointless.