I haven't had a chance to verify but I'm borrowing some of your logic for my Nauvis ecosystem mod (it's called Terra Nauvis! if you want to look) but
148 {
149 type = "bool-setting",
150 name = "biter-repop-destroy-buildings",
151 setting_type = "startup",
152 default_value = true, -- matches current behavior
153 order = "e3",
154 },
But in biter-spitter-migration.lua the destructive update_effects are assigned unconditionally:
265 -- Damages buildings/belts/rails it passes through; excludes
266 -- trees/rocks since they don't use these collision layers.
267 update_effects = {
268 {
269 distance_cooldown = 0,
270 effect = {
271 {
272 type = "nested-result",
273 action = {
274 type = "area",
275 radius = 3,
276 force = "enemy",
277 collision_mask = {
278 layers = {
279 is_lower_object = true, is_object = true, player = true,
280 rail = true, train = true, transport_belt = true,
281 },
282 },
283 action_delivery = {
284 type = "instant",
285 target_effects = {
286 { type = "damage", damage = { amount = 500, type = "impact" } },
287 },
288 },
289 },
290 },
291 },
292 },
293 },
Just thought I would let you know while I was looking through it!