From what I have been hearing, the straightforward conclusion is that if the player does NOT get his/her character to the settlement in a timely fashion the outcome is automatic: "Failed to defend ______". HOWEVER, there seems to be a wide range of just how badly the settlement will suffer. I have had outcomes where pretty much ALL turrets were knocked out, ALL water producers were damaged, ALL generators damaged, and ALL crops damaged. Then I have had at least one case where ONE turret was damaged and that was it. And outcomes anywhere in between.
I think it is obvious by the fact that when the player character is present when an attack takes place and the settlers mop the floor with the attackers that when the player character is not present, the program does NOT play through an attack sequence to determine the results. It simply declares the settlement the loser and then starts to ascertain just which things get damaged. This is how I think it is being done:
1. No player character present = "Failed to defend"
2. A Random Number Generator is activated to determine just how bad the damage will be. The probability of something being damaged will be 5%-95%. (I am guessing the RNG is based on the old D&D 20-sided die, since nearly all RPGs grew from that seed.)
3. One item at a time, each plant, turret, generator, water purifier, etc. "makes a die roll". If that die roll is = or < the percentage that the RNG generated, then that item is declared "Damaged".
Given the speed of CPUs these days, that whole process would take less than 30 seconds. (Probably more like 30 milliseconds.)
This theory would explain why it is that despite the fact that a "battle" took place, there is NEVER any enemy casualties lying around, none of the settlers get killed and why even at its worst, not EVERYTHING has been damaged, nor is NOTHING the only apparent damage. (Though those two outcomes are, in fact, theoretically possible.)
I find that the most galling aspect of "Failed to defend" outcomes is that there is absolutely nothing that the player can do to adjust the results. The possibility that a settlement with minimal defenses is barely damaged is just as likely as a MASSIVELY defended settlement is thoroughly trashed. And the above theory could very possibly explain just why that is.