Disabling the delete function when there are enemies in a certain radius/distance is a good suggestion, I like that too, I think Stronghold had that feature.
Scorched-Earth strategies were done before hostile forces enter the area to deprive them of the resources in the area, not the other way around when a hostile force have already conquered the place.