You can beat every ship in the game as is with just your sloop and four imperial long guns. Just throw on some semi-decent hull/sails and you are set. As long as your crew members are sufficiently leveled, you should come out on top by spamming in-combat repairs, barring unlucky rolls.
Good luck. There is at least one ship I have encountered in game that can easily land hits outside it's optimum range, and can do very high damage per salvo. You will be unlikely to beat it with a sloop, I don't care how good your crew is or what upgrades you have. You can ram it, but it's crew is also level 15, so I hope you are pretty darn far in the game.
Yes the sloop played right, with a good crew, good upgrades, and good guns, can beat "most" ship encounters. That said, you will take a long time per fight doing it that way, assuming you even win every time, you might not because there are a small amount of legit nasty ships out there. Meanwhile I sit on my junk, close to 400 give or take, fire two salvos, and i win. No I don't care what the other ship is, two salvo's I win. I won ship battles against Galleons with upgraded hulls in 135 hp in less than 2 minutes.
Ask the guy with two imperial long guns per side how long his ship battles take?
Yes it costs a lot to get the ship, and all the upgrades, but trust me, it makes ship combat insanely faster. Also, what else are you spending it on? Yes, there are cool items in a lot of shops, but most of them aren't as good as what you can loot, or you can also loot them somewhere else. Additionally, farther you get in the game easier it is to make money, I have cleared some dungeon maps where every mob was dropping exceptional gear and I sold the stuff for over 20k from that one dungeon only.