Actual "safes" are not a good idea on a boat. Like you mentioned they rust shut as they are not designed for the salt water
. And they are not necessary.
- - In any boat there are corners and cubby holes and "dead spaces" that can be converted into "hidey holes." You rework the area with moulding and trim that is removable along with panels
that look like the normal walls. Especially in area with pull out drawers there are normally "dead" space around and behind the drawers. Since a boat is a series of curving surfaces and we normally have "square" or rectangular furnishings it just takes a little looking to find lots of places to put "hidey holes."