Hello!
I like this mod, but I ran into an issue while playing with https://mods.factorio.com/mod/warptorio-space-age mod.
While you only need to deplete a demolisher's health once, each segment is a separate entity, which meant the mod added research for each segment killed alongside the head. This means that demolishers give ~40x the intended research (looking at game code, they have 41 segments in addition to head, I think).
I discovered this because warptorio adds a separate demolisher type, and for some reason I couldn't make the code work when copying your lines from vanilla. Probably because I wasn't referencing it properly.
The good news is, I discovered an alternative way to handle things. You can simply set to ignore entity.type == "segment", same way you ignore non-hostile entities dying. This means only the head will count for a kill, preventing "excess" research. Though it won't separate between the demolisher sizes, so perhaps it's of no use to your intended design.
On a side note, any reason you used a hidden 400 divisor instead of using float value for the scaling setting?