Lock your Chest to protect your Items from other Players and Creepers.
If something breaks the Chest it will replace itself without any drop.
Even Hoppers underneath the Chest won't soak up your items. But be aware, if you put items with a hopper into a locked Chest , they will be lost.
The Crafting Table will show a Gold Nugget as result, but you will get the correct Item after you take it out.
Show Messages in the Chat instead of above the Hotbar, to disable it again you need to execute the same Command except of the 1 replace with a 0.
/scoreboard players set #message chestlock 1
To unlock a chest manually you need to stand on top of the chest ideally in the middle and execute this command. If the Chest is a double Chest you need to execute the command for both sides.
/execute align xyz positioned ~0.5 ~ ~0.5 run function chest_lock:actions/unlock