I like this idea. I think any issues could be fixed with some code magic and spawn eggs, leaving potential for mobs that like to hide in chests, not just impersonate them, and maybe even other containers. Loot tables updated to include spawn eggs. When the container is opened or broken, the spawn egg triggers, spawning the mob. Mobs that are the container could spawn immediately when mined; perhaps give the container an NBT tag that makes it instantly break when mined when it has the right spawn egg.
EDIT: I bet they could tie it to the loot generation, since it doesn't generate until the container is opened/broken.