That is a pretty interesting question. Note that I play prewarp with Icemania's AI improvement mod.
Since I installed that mod, I can't afford to pay pirates beyond the prewarp-phase. Not that the imperial economy can't handle that expense, but the unlawfuls can turn that income into a mass of ships. In case I forget to cancel even an 500 credits agreement for a while, the huge fleet they can build from it either cripples an opposing empire or they hurt mine badly. So I rather struggle with attacks than to ever pay up. The only exception is when another AI in the other end of the galaxy worries me. Quameno, Zenox, Boskara, Keskudon maybe Lipids can grow fast and/or aggressively - supplying a nearby raider faction can cut their advance. Though I keep this option as a last resort - it's easier to battle with empires than pirates that build bases in god-forsaken systems.
Arming mining bases is an even tougher question. Since building, retrofitting and maintaining them is payed by the private sector, it's a good way to put their reserves to use. But it has a serious danger: if their funds run out, civilian production stops. That means a shrinking number of freighters, what sooner or later results in resource shortages - thus even military ships can't be built. The only way to counter that is to cut taxes (a lot), so private income rises, and the newly built ships produce a -big- profit on the peaked resource prices. That mitigates the problem caused by the economic crysis, but I prefer to avoid this situation.
So what I do is to use a stripped down version of mining stations in colonised systems (or very near to them), mildly fortified versions at the rim of my empire, and heavily fortified ones at key resources outside my influence (at super-luxuries, and calson refueling ports). This way I can keep my taxes as high as planet happiness rating allows it while still leting the civilian sector grow.
Just two things to add:
-even the smallest mining stations of mine has 1-2 assault pods. A destroyed base can be easily rebuilt, but an unshielded podless base can be captured even by a single passing pirate, and it requires military units to be cleared.
-my constructors always build the smallest version of bases. Once it's finished, it can be retrofitted to a fortified design, but meanwhile the builder ship can leave where it has more use. It almost feels like an exploit, but one needs all the edge with the AI mod.
Why can't I make friends? Only my Nuclear Devastator understands me.