As for my previous question, is there a general way for one upgrade to depend negatively upon another (like "you can do A only if you have not done B, and vice versa")?
That can be done with subfactions, yes. For example, upgrade A and B both exist in the "base" faction (that is, no subfaction). Upgrade A will advance you into one subfaction, where upgrade B does not exist, while upgrade B will advance you down another subfaction where upgrade A does not exist.
Compared to an existing (kinda) example, in the Four Path Magitech (a kinda started mod that I'd continue one day if time ever allows), Magic's ghost armour exists only in the base and "path of corruption" subfaction. If you choose to go down the "path of nature" subfaction, the ghost armour is unavailable (done by simply not including it in that subfaction). The ghost armour only exists in the "path of corruption" and base subfactions (the only ones listed in its XML).
So back to your example, upgrade A would exist only in the "upgrade A" and base subfactions, and once done, moves you into the "upgrade_a" subfaction (where upgrade b does not exist, and therefore, cannot be done).
<subfaction-restrictions>
<subfaction name="base" />
<subfaction name="upgrade_a" />
</subfaction-restrictions>
<advances-to-subfaction name="upgrade_a" is-immediate="false"/>
Upgrade B would only exist in the "upgrade B" and base subfactions, and once done, moves you into the "upgrade_b" subfaction.
<subfaction-restrictions>
<subfaction name="base" />
<subfaction name="upgrade_b" />
</subfaction-restrictions>
<advances-to-subfaction name="upgrade_b" is-immediate="false"/>