I haven't read this particular book, so I might be missing some context, but there are good reasons to think that candle-box in this case does refer simply to a box for candles (as Kate Bunting and Spagirl suggested above).
Heaving to is a common tactic for sailing ships to survive a storm. When a sailing vessel is hove to, it has very little forward motion, but just drifts slowly downwind, sideways. It will roll about on the waves in an irregular and ungainly fashion, compared to a boat making way under sail. So Conrad's simile suggests that the Judea appears more like a square-shaped box, after heaving to, than like a sleek craft that can glide through the ocean.
A Google Image Search for old candle box returns a lot of oddly shaped open wooden boxes for candles, like this one, which would just about float if jettisoned from a ship, but would be very liable to wobble or tip when dropped into choppy seas. A search for a ship's candle box returns images like the one here, which would float well, but have low stability and be liable to tipping.
A candle-box (whether maritime or onshore) would have been a very familiar object in the 19th century - so I think Conrad's metaphor would have been very clear to contemporary readers.