I'd say no also, unless you somehow rack up like +200% in Soldiering. The lost population to perpetual raids is too damning to the economy. A late starbase rush would tend to fail too unless you somehow had everyone at peace as you need at least a few turns to get a base useful. I suppose going straight for Starbase Fort II, with a 1 constructor per turn build rate, you might get a +10 weapon starbase up in 2 turns, but it'd be risky under war conditions. And that'd only be useful if you rushed straight for it at the expense of all the other techs, for that weapon damage to really hurt the AI (and you'd still be at risk for swarm attacks, like say the "disgruntled employee" megaevent).
Generally if the enemy can put its ships anywhere in your territory unhindered, you're losing or already lost. So you need ships.
To really get a use of defensive building, with minimal ships, you need basically an influence/trade/diplomacy kind of strategy. I've found it works great with the Drath's Super Manipulator ability combined with careful ethics choices to stay alligned with your most powerful neighbors. Using that strategy I was able to eventually influence flip all the neighbors, go for Diplomacy bonuses/wonders and then sell my techs for mad money to use to bribe wars to create mass chaos in my favor. The influence flipping was easy after wiping out some nearby minors, building cultural exchange, and maxxing out a few influence resource starbases. A key first was equal trading with all my neighbors (going the Neutral Trade route) and trade starbases.
Getting trade up ASAP, and maintaing a middle power military is key to a peaceful defensive game, as a big weakness of being defensive is getting picked on by multiple races. They harass you for cheap while you struggle to keep them all out of your area. Trade and strength make for easy peaceful relations.
Edit: one special benefit of the Super Manipulator is it's easy to get control of the resources. Just preposition constructors and manipulate some wars and the collateral damage will tend to wipe out the base.