I had a huge problem with Carpenter ants in my house a few years ago. They were living in some rotted wood in an old deck and came into the house for food or whatever. Barrier spraying did no good, they find a way in. They detect the spray and won't walk in it. You have to bait them. The answer was a product called Advance Carpenter Ant Bait. You can buy a jug of it off the internet for maybe $60. It's about the consistency of kitty litter and you sprinkle it around the house (or in your case, maybe in your bilge, just not anywhere that's wet.) It disappears. They eat enough of it, feed it to the kids, the colony crashes, bye bye. It takes a while, like weeks.
I just had some come back this year and have to buy some more of it, but, they were gone for 3-4 years. Everything else I ever bought to deal with them was a waste of money.