I think they are superior in that sense to planets, considering you cant just magicly grab a planet out of nowhere. But if theres celestial planets in a system you can park a habitat over it.the main point of a habitat is that you can place it where you need it [most the time] and thats good because you have more control over where your sector capital sits i.e, X jumps in every direction from this habitat
yes they do block fleets somewhat but it doesn't stop a fleet passing through the L gates to reach some other juicily target unless you also park a few ships close enough to draw them into combat with your defenses. So habitat + station + fleet is a good blocker... just a habitat normally does bugger all
If you are going for a 'this system is my main gate. and noone gets to enter but me' type of system though id fill it to the brim with habitats, make them all fortresses and as much of a pain in the backside to deal with as possible. Taking 1 world/habitat isent so bad, even if they have a few thousand personal on it. But several? Thats going to take time. Time your opponent probably doesent want to spend on taking a single system. So long as the planets/habitats arent taken over you can still use your gate though so you can use that to quikly reinforce the system and kick them out again.