What good is +5 def when Sharks have 44 att? I always max my starbases - just for peace of mind. you can never tell when there might be a diplomatic incident.
I don't think it's worth building extra starbases per sector now that the upkeep is 10. You'd need to have a high-PQ planet to really benefit, or be playing on tight/abundant and have lots of planets in the sector.
It is impossible to avoid war with sharks and pirates and they will often go for your resource starbases.
You know far ahead when these come, and can send ships there if needs be. They are pretty uncommon too. I use very few resource starbases, and they are not very important in my strategy. I once lost one because I had forgotten to make peace, but that didn't harm me at all. I just lost a few turns on this particular base.
Of the 10 constructors you've used to build up defenses on starbases, how many other modules could you have built? Probably enough +Prod modules to replace the starbase fast. Also, starbase defense is quite pitiful against capital ships before you get the avatar killer at the very least, so it's very expensive where a ship can defend the base and do other duties.