Yeah, i understand the frustration of fighting a maneuverable disabling ship like the hwatchafish.
you can check your enemies ship load outs and fly a ship that is designed to couter their builds or if you prefer your galleon try building a long left side and using a combination of field gun and lumberjacks to bring them down before they get to you, with the field gun always aiming for the enemy guns.
Also, I suspect your teammate kinda let you down there. the hwatcha can lockdown a galleon, true. However, to do that it has to keep laying down fire on that single target. That is when your ally should come in and help you out. You can tank the damage in a galleon while your ally kills them. Alternatively, you can use a bit of creative rebuilding to get your guns back.
When all your guns go down have your crew partially rebuild them so it only takes one more hit to bring it back online, as the guns cannot take more damage while they are already broken they will be safe. Then, after your enemy fires another volley on your broken guns, finish the rebuild and open fire with some luck and a bit of good gunning you will take out their gun during the reload and you can turn the tables on your enemy and keep them disabled or kill them outright.