Based on my time playing it seems to be a mix of the two options you described.
The story teller seems to go through each of the factions based on what needs to happen next. For example, if there is going to be a raid, it chooses factions based on who attacked last. So if faction A attacked last week then they will likely not (in my experience) attack until it is their turn in the rotation. In between attacks it goes through who will trade/visit etc. Then it's faction B or Cs turn to attack based on what the story teller decided should happen.
The above description is my own experience and it may vary from person to person, but something that applies to everyone should be the following factors:
Who's got the best goods?
Who's got the best guns?
Can you take either?
To explain a bit more. If one of your neighbouring factions is more advanced or on the same level, do you want to trade for their goods or would you be happy to risk some of your own guys lives for a sweet new rifle or maybe some armour? Could you afford to buy it instead?
If your neighbour is hostile and has the potential to wipe out your colony, who would you rather have by your side? the guys with bows and arrows or grenades and rifles? You can call on allies to help fight invaders or just use them as meat shields for the incoming barrage of bullets and bombs, also remember, all loot on the battlefield belongs to you. If you play your cards right you could get two high-level factions to fight on the battlefield and take all of the spoils.
It's all in the context of your colony and what you choose could either benefit you greatly or potentially ruin your colony. So the ultimate questions are, what's your biggest gain and biggest loss from the outcome of the next attack, what goods do you need the most/have a lack of and what goods could you sell to them?