Yes, you’re correct. A vigorous response, with a lot of dead pirates, will end the problem quickly.
The shipping companies can get together on this problem and start building Q-Ships without any tax dollar money being used. All they need is a green light from Congress(even though that is unlikely)