You can do this considerably easier by using cylindrical magnets polarized through the radius. Then the magnet just rotates to the appropriate alignment to mate with the selected neighbor.
But yes… using the latching polymagnets on the lid so that:
- It is impossible for the lid to slam down hard (magnetic braking)
- You can securely latch the lid closed
That would be pretty sweet.