Good idea
Beneteau installed an lock assembly that was keyed on the outside, and had a knurled knob on the inside - either one would lock / unlock a pin that engaged the sliding hatch. You could simply install a locking slide bolt on the inside that engaged a hole on the sliding hatch.
BTW, I wouldn't trust any of those swinging campanionway saloon doors to stop a boarding wave. They are strictly for laying about the slip, mooring or anchor - where they work really well.
I planned to use the sliding door latch for the top panel, but installing a deadbolt on it would lock hatch as well. Stacking them would be a little harder, and I already don't have a good plan of where to put them once removed, as my cockpit access storage has so much fishing gear, it will be tight. Definitely will try it though. That or get a Pitbull as second mate.
update: lock requires door thickness of 1 3/8" so wood spacers would need to be made, not a bad job. But it dawned on me how quickly it would rust in salt air...not good.
PS, The packing that came with my solar panel is thick and sturdy. Perfect for protecting the hatch panels and keeping them together after using some duct tape to form the cover. Mine are freshly painted, I like, but don't want them getting beaten up.