I put hangars on my capital ships for that very reason. I just use size 9 sensors that fit into fighter pods, that I build with fighter factories. No retool cost.
It means if I have a squadron of 6 capital ships, I will have a flag bridge pod, an EM Pod, 2 Res 1 pods, a thermal pod, and 2 anti-ship pods and possibly an anti small craft active sensor. It also means that if I lose a ship that carried a sensor, instead of having to retool, I just switch out the sensor pods.
There is an added benefit: because you can only activate and de-activate active sensors on a ship by ship basis, by having the sensors on pods I can ensure by res 1 sensor is ALWAYS up, but I can switch off my noisy anti-Swarm mommy ship/commerce hunting res 500 sensor.
I am going with LACs as my primary early missile ship in my current game, so I might only build size 50 antimissile and anti-ship sensors for PDCs for my colonies. Might be an interesting tactic, find an asteroid that will be within range of the target enemy planet at some point in the orbit, build a sensor and point defense base there, using construction bridges on pre-fabs.