IDs aren't complicated, in fact you would need IDs to separate the chests from one another. I still don't know how to do the locks, if it's a non-existing thing that you buy from a NPC or something else.
I personally hate commands, that's why we have banker NPCs for example. It's much more fun actually interacting with the environment than using commands IMO.