So you own a colony with the level 3 pirate structure? It is easier to take them out early.
10 troops is a loose measure, as different races have difference "starting strength". In my experience, 4-5 troops take out bases, but they are not that mature. Build some troop transports, and bring more troops.
Your description does sound a bit excessive, but I guess they have time to grab a colony that early. Think of those pirate colonies as "soon to be mine".
My main (not very hardcore) way of dealing with pirates is:
- Do not be too eager with early colonization. You have to defend them.
- Don't feed pirates easy money.
- Bust their bases. If they have no nearby base, they won't harass you. As you expand you will of course get into range of other pirate bases.
You are not saying much about your settings. With default (non modded) AI designs, I would try bring some 40 ships or more on a pirate base busting mission. That is in a tech level where frigates and destroyers make up the fleet. It is almost impossible to stop a 10 ship pirate fleet from killing a mine or dropping raiders on a colony, so it is better to bust their base.
If the base is camped by lots of defenders it will be very hard to kill. Try make a smaller fleet (maybe 10 ships) that jump at the star and starts slightly ahead of the main fleet with attack order on the base itself. The defenders should jump at the first fleet (at the star) as they arrive, meaning they won't be at the base and it gives the main attack fleet some time to fight the base more or less alone.
Also, you don't declare war on pirates, you just kill them and gain reputation for doing so.
At the launch of the Universe edition, I did an AAR with lots of automation that ended up with a massive pirate fight. You may see how I solved a rather pirate infested situation.
The first pirate base bust should be in post 20 or thereabouts. Lots of pirates, nearby, with automation and a slow breeding race was not a good idea if the goal was an easy start. I also bribed no pirates in that game, and did two stupid, early colonizations of not very good independents.