However, we have the heating in the attic
That probably prevents a large storage tank from being installed. However, several smaller tanks might possibly work as well.
But it would also be suitable for the instantaneous water heater. Not exactly cheap devices, but designed exactly for this use case.