I am no modder and I can't remember exactly how I did it either.
But it is possible at the least to mod hit points and firepower on both shipyards and Starbases.
I run 300 hit points and 50 each on defenses on all my shipyards and 500 on Starbases and a bit more firepower too.. I have changed this in my base game files so affects all players. It prevents the AI in particular from running amok with single medium ship ruining your economy in the early game. Note neither can you. This also makes those pesky pirate and monster bases harder to remove so you need to escort constructors and colonizers until you research enough tech to kill them effectively.
So yes it is possible. I did this a while ago and from vague memory I think their might be 2 files that need to change or 2 points within that xml file. If I can figure it out I am sure others can.
One thing I can tell you is that you need to start a new game before the changes have an effect. Something about the way games are saved prevents retrospective changes. This is true even of updates/patches from Stardock. Also note that changes to base game file may get over written from time to time by updates.