There should be random cargo in the sea and you should be able to put it on your boat. To unlock the cargo and the treasures inside, you would need to dock at the nearest island/a captured island/ or a special island for cargo docking?
It could have treasures which rarity or value become lowered if there is damage done to the boat by enemy ships.
The cargo should also be able to be taken by other players or maybe by npc pirates, by either killing all the players on the targeted boat and have the cargo instantly be transferred, or by a small animation where the cargo is moved onto the boat (this could take longer time based on how much cargo is being taken).
The cargo could be shown by being attached to the side of the boat with nets or inside the boat (that depends on if boats will get interior rooms or not), and the more cargo is picked up, the more boxes will be shown. And maybe in different colours to show their value.
This might be too tedious so maybe this system should only be used for high tier loot, and more common loot can be opened instantly. There could also be different types of cargo to match with its area, for example the cargo that is found in a very hot area must be transported by a route with high temperatures otherwise the cargo could go down a tier, or the cargo could be cold and it will melt if taken through warm areas.
A way to limit low level players from getting high level cargo, there could be cargo nets that can be bought at lvl 100, 200 and 300. Maybe these level requirements can change based on how op the player gets at those levels.
Finally, another feature that could be added to this is that it makes the boat slower as more cargo is added, but this might be annoying for some players because it would be hard to get away from other players trying to take the loot.
The reason to add this is because it will make sailing more eventful and fun.