If planet A has a large number of defensive structures and a large variety of defensive ships parked in orbit, a smaller enemy needs access to a cheaper device/technique to inflict a large number of casualties other than an offensive fleet of greater size (and cost) than the defender.
Why?
Turtling (or really, making a strongpoint on restricted terrain) is a time-honored tactic of warfare. Where were castles placed? On the open plain? In a valley? NOT
Look at famous battles like the 300 Spartans holding off thousands of Persians.
Conquest through the ages has followed the pattern of going from defensible terrain to defensible terrain. If you get stopped in the open, you get pushed back to... defensible terrain. Sometimes you make defensible terrain, like Hadrian did with his wall across Britain. Sometimes you make just defensible terrain better - with fortifications.
Taking fortified positions is expensive. But….. You can’t win this game if you just turtle up. Sooner or later someone owning the rest of the galaxy is going to come knocking and they will be able to spend the resources to either reduce your fortification entirely, or just sufficiently to go past and raise all kinds of havoc in your rear areas. And then come back and entirely reduce the strongpoint (and eliminate you in the process).
That said, there are already attributes available to the capital ships that could make them effective against orbital structures, and if need be, others can be added. New types of ships that have specialized attacks in this area (like the flak frigate vs. fighters) can be added as well if they are needed.
Learning how to deal with this is just another test of your adaptability – not all warfare is the ride and slash cav – sometimes you have to go over the top and hope you make it across no-man’s-land, too. (Today’s version of this is urban warfare.

)