Thanks again for developing this, its absolutely everywhere in my base now.
I've noticed that the circuits, when destroyed and rebuilt, appear as a blank, with all connections missing. Repasting a blueprint over the top also doesn't fix it: one must first remove the circuit, and only then repaste the blueprint.
I think you've mentioned in the past that there is something about the factorio modding API that makes expected behaviour impossible. Maybe one of these hacky work arounds might be possible / easy to implement?
a. Add setting to make circuits invulnerable and thus cannot be destroyed by bugs or friendly fire.
b. Make circuits not leave a ghost for rebuilding, instead sending an alert that it needs to rebuilt.
c. Make circuits go to 0 hp and cease to function, but not actually destroyed as such. Then they would need to be repaired to 100% hp to resume function.
Those are probably terrible ideas, but otherwise using circuits for base defence can break the automation of self-healing defences.