The history is linked to the feature ID, not to its category or type. When a device is registered, an existing feature is updated without being recreated. Changing its type should therefore preserve the history.
But the interface only allows changing the category in a few predefined cases: switch ↔ light and shutter ↔ curtain.
I suggest creating a separate feature request (citing this one)