first, you will need to dig 8 x 3 space and 2 blocks deep. make an extra space with 3 x 1 and 2 blocks deep on top left corner like so.
this is where the entrance is going to be. place any block at bottom and place a flooring material 3 blocks next to each other like so.
place an iron door at middle and place a redstone torch where you can see little bit where my pointer is. place door first and then place torch underneath.
behind of the block where you placed torch, make a redstone clock and connect to block
behind a clock, place block of your choice like so and place redstone dust right there
place a repeater and dust and connect it to clock
place a trapped chest at the top of redstone dust one we placed on step 5.
cover up the floor and wall with your block of you choice
and, build a sealing. its all set!
in order to reset trap (after someone got trapped in) you will have to go to extra 1 row at the end and replace a redstonedust on clock
once someone open chest, door will close and he/she will get trapped!
The creator of this guide has not included tools