seems to me the fix is simply to add one tiny breakable component and a few engineering bays. My hangers will probably run a CIWS
..But then its not truly infinite, and you will have to add engineering on top of the ciws.
There are a lot of problems with craft that should stay in space forever, but has maintenance life. The only options of limited lifetime without a maintenance base are:
1) Regular Overhaul - But this will eventually take maaanyyy years to do if the hangar was in space for decades. Trust me, I did this, and you are better of scrapping and rebuilding. If it doesn't stay so long however, it will be bothersome to manage by hand all the time.
2) Steady MSP supply - Can keep a cheap module up forever, and also still for cheap cost, but you will have to deal with permanent interrupting maintenance failure messages that destroy auto-turn.
3) Disassembling - After a certain longer life time you just take the thing apart, and maybe build a new one. That is what I currently do to evade the eternal overhaul. For ships that last 20+ years it is actually much cheaper than regular upkeep (which costs [shipcost]/20 per year), as you can also reuse some components. Feels however kind of immersion breaking and the cost in crew, TF-training and such might be a problem.
4) Overhauler Ship - New idea. You could have a huge hangar with reasonable (but not decades) maintenance life being towed around by civil engines(saves fuel and MSP). It could visit your station once in a while and "consume" the or one military component for some time until it looks shiny again. When the work is done it waddles back to the docks somewhere distant where it is cared for, so this would also evade extreme lifetime stress. Much easier to handle than option 1 as you do not have to assign tows individually for every module, then also don't have to check every module when it is finished individually, since all work is centralized in the maintenance ship.
If that is a good idea depends just on how far it really is to the next maintenance capable + fuel base colony. But then what you could also do is leave one such "maintenance hangar" there and build a second one at the distant base. When the old one starts to make too much errors, you fly the other in and the old back for repairs. ...Of course you could do that with all the systems of the station already, heyyy...
5) Second 'Ghost' station - Just build two stations, one real - one spare, and store the double in some big PDC hangar distant of (is always better than maintenance industry anyway). When a part becomes noisy, you exchange it for the doppelgänger
(and no one will ever notice). -> Eternal overhaul avoided, and no problem doing it by hand, as in this case you can just save the commands for every module exchange, and the returning part will get ok by itself without you having to watch. It is weird, but has the least micromanagement burden of all + minimum maintenance cost (fewest amounts of MSP in the PDC hangar).
I did something similar with my fuel harvester bases in earlier games, except that I always just exchanged 2 "fuel pods" that the harvesters would fill up.