A) the tag is old and necessary for starbases to work at all. Unless they hard-coded upgrades(which is obviously false, because my custom modules still work) it still replaces the old module.
B.) again, this cannot be the case, because the "level" doesn't exist and so cannot be known by the game.
In any case, I just tested it. Removing the prereq of the system defense module breaks the automation - the module will replace, as a normal upgrade, the system defense module. Basically my idea was correct in the general idea. One thing which is sort-of correct - starbase modules inherit their parent names, which is why the generic starbase defenses still work as prereqs after upgrading. If you do it ANY other way than what you did, it breaks in various ways. Modules can be replaced by a different line and can't be rebuilt, side branches can't be made, etc.
But going back to your original question, there is no generic ring. If you want to run the extended range and sensor modules automatically, branch one group off of the other, or create a module to branch them both off of.