For countering stealth there should be some kind of module you would have to build like the repair station that would take up a tactical slot and detect stealthed ships around a certain area.
I thought about it and I want to add to my idea. I thought of two techs (stealth and counter-stealth) of the same high level (maybe counter-stealth one level higher). When researched, counter-stealth would be passive for all your planets/capital ships with an area of effet (easier to detect near the planet than far from it in the gravity well). So, ships getting really close could be more easily detectable. Also, as you suggested, a counter-stealth module (like repair station) could be built as a "detection amplifier" which would reduce the time of detection and expand the area of effect of the planet. As I said, there would be a detection delay... not just pure instant detection (which would be boring I think). So, even in stealth mode, no camping in an enemy system.
Of course, in my idea, the stealth technology would only unlock a small fragile expansive stealth scout ship and would not apply to other ships.
Presently, that "spy system" would add absolutly nothing to the game hehhehe, I just proposed it

One thing that could be tweaked is the current scouting detection that ships have. Instead of getting an instant reading at a planet, structure, ships in a gravity well, that reading could be dependant on the time taken to scout and the closeness of the targets. If you enter a gravity well and leave it right away, you won't get that much info (like planet population, ships shield/hull/antimatter report, structure health report...), just a feeling (number of ships and types, etc.). But if you take some time to get close to the ships, the planet, the structures, then you could have a complete reading of their current statuses. This is where the stealth tech (stealth scout ship) could be usefull

Anyway, just an idea I developped in my mind. I like to do that and share with people. I think that this idea can add some to the strategic factor of this game (like for an offensive preparation or fleet regrouping detection before strike), expecially in multiplayer (fun to spy your human friend:) ) And it could implement a simple Spy System without any dialog or menus, etc.
So Devs, take note of my idea if you like it and talk about it

If not, well I like Sins a lot even without it hehehe.
Thanks for reading till here!