Not really. The standard procedure to "repel boarders" is to:
1. Try to outmaneuver the pirate boat. 2. If that fails, point and blast fire hoses at pirates.
Crews don't [usually] carry firearms because of insurance liabilities. If there's no crew on board, then more robust defense mechanisms can be used.
Finally, depending on the cargo and location, I would imagine selling off the cargo would be a simple matter.
The ship itself is often the drop location for ransoms; piracy doesn't generally require hiding the ship.
> Also, without hostages, using armed forces to take the ship back would probably be a lot easier.
This is a significant point.
In any case, it seems ships already use sonic weapons against assailants, maybe those could be remote controlled.
Or just disable propulsion and then tow the ship. They'll probably figure out some cheap ways like "throw a fishing net into the turbine".
Now it is a matter of climbing on board and breaking the locks. (And no I don't think automated guns will be an acceptable solution. I can't see the NY port Authotirty being happy about armed computers sliding into view.
(Why am I thinking of the Matrix cartoon / prequels now?)