Dealing with pirates isn't too difficult.
Just make every piece of space you own a fortress world. 21 guass turrets + 2 repair platforms will make sure they have fun while your away raiding land and pillaging villages.
You can only fit one gravity well per screenshot.