> Does heating water in a boiler work well with a heat pump?
Sure, heat pump hot water tanks are a thing. Air-to-water heat pumps are less efficient than air-to-air as they need to reach higher target temperatures, but it will be more efficient that straight resistive heating by a factor of 2 at low input temperatures, and 3+-ish at high summer temps.
The primary concern would be the quality of the tank’s insulation. I would hope HPHWTs are good on that but if you’re looking into that you probably want to double check the heat loss of the tank.