WTH please make it easier to manage entities

When I replace a piece of hardware that measures stuff (for instance, a Shelly plug) I find it very difficult to preserve the statistics generated by that device, for the energy dashboard etc. Same goes for automations using that device as input.

I would like to have an intuitive management system for entities to that this becomes more flexible.

Duplicate of https://community.home-assistant.io/t/wth-can-t-we-easily-replace-devices/804594