Here is another idea, a Micro Switch with a small lever with a roller piece on the end of the lever.
Position it to turn on when the lid is lifted.
This is one Subminiature water proof micro switches - IP67 MP500 - MICROPRECISION-ELECTRONICS - Miniature switch and Micro-switch for electronics
, but I am sure you can find one at Rat Shaq that will work.
The more the switch costs the better the switch will be.
If you use LED Lighting you can keep the wire gauge small around 22 ga and that will mean small holes; use small grommets.
You can wire it into the Cargo Light circuit or off a Keyed circuit or maybe direct power but put a fuse in-line and an indicator light in line ( not grounded separately) and when the power flows the indicator will light up indicating wither the lid id open or the switch has failed.