An un-monitored obstacle is just an annoyance to a thief. The product would
work while under way, because it would make it tough to board. Then again, they could just force you to stop and disengage the system.
My take is that you kind of have to decide if you're going to resist ahead of time, and if you aren't, don't make things needlessly tough for the pirates. It'll just piss them off. If on the other hand, you ARE going to resist, it's best to have a variety of options available.
Guns aren't always a good idea in some countries, but a sufficiently motivated human can be plenty dangerous without them.
Most places will allow a variety of non-firearm weapons, which are VERY effective at below decks range if the user does his job. Machetes, "Decorative" swords and spears, etc can do more damage than a gun at in your face distances. You have to be competent though, and you have to be prepared to get hurt and to be really brutal if you plan to use them. There are also some really nasty surprises you can leave lying around on
deck for unwelcome visitors.
Just be prepared for lawsuits if they survive.
I've been thinking about a solution for a "welcome mat" with internal pressure switches and surface contacts for a stun gun system. You could place it at the boarding gates and stun the poo poo out of anybody that stepped on it. With luck, they'll be knocked out and
overboard, and you can just up
anchor and leave.
Another version would have a series of lead plates with straightened
fishing hooks protruding from them. With luck, the bad guy falls over taking a couple with him. If not, he definitely will need some serious help, and he won't be walking well.