Not (A). Anti-static foam is a poor conductor. It is meant to bleed off static charge and that can occur slowly so there is no need for it to be a good conductor. Wrapping the inside or outside of the case with
aluminum foil could act as a Faraday cage and may be helpful but connecting it to ground would be a big NO as that would tend to make it a desirable path for
lightning to follow.
(B) is an OK plan. Lightning is looking for an easy path from it's strike point(s) to ground. The plastic pelican case itself is not an attractive path component. Keeping the case away from metal or other conductors further helps make the case an unattractive part of a conduction path.
Your goal is to keep the lightning conduction path away from your
electronics. The best strategy is to keep them inside a full enclosure of conductive material and to have that container isolated from other conductors. Hard wired electronics are in
danger during a strike as the boat's
wiring will carry the lightning
current to them as part of the conduction path or as induced currents and resultant high voltages. Handheld electronics can be relatively safe if stored appropriately. It is just like people. You don't expect everybody on board to die just because the
boat was hit. On the other hand if you are hugging the
mast during the storm you are in trouble.