Well, I tend to choose a starting position with an eye towards having few inroads, and typically conquer about 5-8 planets in the first few hours of the game to get it down to 2-3 hostile wormholes. I might have a few more wormholes than that bordering AI planets, but if I've cleared off the warp gates and special forces guard posts, then that isn't much of a worry, really. Little bits of stuff might wander in, or a CPA might come through there (which is bigger trouble), but overall it's nothing too terrible.
Then, as I grow out into the galaxy, I'm likely to have a lot more planets that are in danger based on being adjacent to many enemy planets. Some of those I capture and then just lightly defend (if I was capturing them to get an ARS, for example), and then if I lose that planet, that's fine. Having a central "resource producing core" that is well defended is critical, and if you don't have an advanced factory in that then getting a well-protected Advanced Factory planet is also then a good goal. And beyond that, fabricators and whatever else can be helpful, but it's dependent on how hard they are to defend compared to what you get from them.
My general total of 20-30 total captured planets on an 80 planet map includes those planets that I took purely for positional advantage to get closer to the AI homeworlds, for instance.
(Moving this to strategy discussion.)