Then allow me to huff and puff and restore them.
What the OP failed to mention is settlement destruction only happens at higher levels, and if you think about it, that makes sense. The majority of defense turrets are low-leveled. Taking out Raiders is easy. Taking out Raider Pyschos isn't. Settlements near the north generally won't get destroyed. Only settlements to the south, as that's where the stronger enemies are.
Even with the knowledge some settlements can have damage, it's more realistic this way. Sure, you're not there to defend, so it's a crap shoot. I had a settlement warning pop up today, and when I got there, the wave was already dead and I see two dead Raiders next to a machine gun turret that's still working, telling me they were trying to take it out.
I'll say this now: if you want to protect your settlements, protect the settlers first. Give them stronger weapons and armor, and yes, they will defend when you're not there. People always forget this part. That's why those Raiders were dead. Both those settlers (there are only two so far) are packed with combat armor and powerful 10mm weapons.
As for the "spawn in the compound", there are tactics at play here. Since you know this is to be true, then you need to be more critical in how you set up those defenses. Putting a large wall around a compound with a few turrets inside is piss-poor planning. Here are a few tips on this (and protect your turrets in the meantime, even if they can't one-shot kill stronger enemies):
-Use the cement block and raise it just high enough NPCs can't climb it. Place a generator and a laser/missile/shotgun turret. Yes, they will point down, but be sure they have line of fire where the block edge won't interfere. For BEST results, place them within a prefab surrounded by 3 walls.
-Make sure you protect the generator! They go down fast and easy, and once the generator is out, so is the weapon.
-Position walls within walls. If a team swarms inside the compound, make them "maze" to get out, and strategically place turrets pointing down the "hallways". Not only will this keep them busy, but your settlers can also wipe them out. The idea here is to bottleneck them.
-Give your settlers access to high platforms by placing the low-height defense station on top. When attacked, the settlers you assign will take those posts. Higher ground > on the ground.
Those are just a few tips, and they'll make a difference. Time to think like a general, general! 