How to fix all-time totals after factory resetting a total_increasing sensor?

I have several Inovelli switches that expose a sensor.[switch_name]_summation_delivered sensor with the following properties:

state_class: total_increasing
device_type: Electric Metering
status: NO_ALARMS
unit_of_measurement: kWh
device_class: energy
friendly_name: ...

For troubleshooting purposes I recently factory reset one of the devices and re-connected it to ZHA. Before reconnecting it I deleted the old device, so the new one used the same entity names and the history is associated. However, since the device itself reset its internal counter, the value appears to have dropped to zero:

Given that I know no data is lost, only that the all-time total is now incorrect, how would I go about recovering the correct all-time total kWh value? Can I fix this in statistics, or is there some other way?

I already tried looking in “adjust a statistic” but I only see zeros around the time when the switch was reset: