To check I understand you: the smaller tank with heatpump would consume less energy outside the time window in which energy is free than the large tank with resistive heating, but has a higher capital cost which would outweigh the amount saved on energy?
If that's right, it's not obvious to me that building a suitably sized solar panel is environmentally worse than building a heat pump.
If that's right, it's not obvious to me that building a suitably sized solar panel is environmentally worse than building a heat pump.