The only levelSourceTypes in use in sins (and probably the only ones that exist at all) are FixedLevel0, ResearchWith(out)Base, Intrinsic and StarBaseUpgradeLevel. Researches can't be put on autocast, only the AI can research things "automatically". There is no way of directly checking passed gametime, only the indirect way of applying a buff at the start of the game and then have it do the counting.
Your plan with the artifact has the problem of being tied to the home planet's type. And you could just abandon that planet once you have 5+ other ones, and spawn ships at the base rate. Add to that the hard-coded level maximum of 3 for any ability, and you're screwed.
Passive/Periodic/Overtime buffs are the only things you can rely on, so you have to go with those. I think ApplyBuffToTargetsInRange is limited to one gravwell, so you have to somehow spread the information from ship to ship. Since we're talking about shipyards here, how about forcing the player to construct new ones with special constructor ships, which you have to build in a gravwell containing an existing shipyard? Then you can carry the stacks of debuffs from the original shipyard over to the new one via the constructor ship? Or maybe make the shipyard a low-income Tradeport, then have the Trade Ships carry the debuff from station to station? Needless to say, this is complicated, messy and ugly as hell, so I suggest you tie the debuff to shipyard lifetime and not gametime.
Just make the passive ability less unsightly. Make it a generic armor/shield/hp/regen buff per description: Give the structure 0 base armor, then make the buff give it +1 armor or something. Give it a fancy name and you're set.
I doubt your system will work in the end, as there'll always be a loophole: If you tie it to an artifact, people can abandon the planet. If you tie it to the shipyard people can scuttle it. If you somehow tie it to an indestructable tradeport that exists from the start of the game (on each star?) you'll need a crapload of tradeships, each loaded with large stacks of buffs.
The best way I can think of is to apply your counting buff to the host planet of the shipyard, and synchronise all successive shipyards around that planet. That way people would have to scuttle all shipyards and abandon the planet to reset the count for that planet only, which probably won't be worth the effort.