I’m not sure whether this is a bug or not, but turrets lose their kill and damage dealt stats when you upgrade or downgrade its quality (even when using the upgrade planner).
I think that this should be fixed/changed so that turrets keep their stats after upgrading or downgrading to a different quality.
Factorio version: 2.0.55 (build 83138 expansion, win64)
Turrets lose kills/damage dealt stats when replacing with other quality
Re: Turrets lose kills/damage dealt stats when replacing with other quality
It is no longer the same entity so it does not retain its stats. You can make a feature request here: viewforum.php?f=6.