1. Make a marker armor stand invisible inside all chests of this type when they are created.
2. Write out a bunch of execute setblock destroys for each block around it you want to destroy /execute @e[type=ArmorStand,name=blah] ~ ~ ~ detect ~1 ~ ~ cobblestone -1 /setblock ~1 ~ ~ air 0 destroy
3. Create a scoreboard for items i.e. ItemID
4. /execute @e[type=ArmorStand,name=blah] ~ ~ ~ /scoreboard players set @e[type=Item,r=1] ItemID 1 {Item:{id:"minecraft:cobblestone"},Age:0s}
5. /execute @e[type=Item,score_ItemID_min=1] ~ ~ ~ /execute @e[type=ArmorStand,name=blah,r=1] ~ ~ ~ /summon MinecartHopper ~ ~1 ~ {TransferCooldown:0}
6. /execute @e[type=ArmorStand,name=blah] /tp @e[type=Item,r=1,score_ItemID_min=1] @e[type=MinecartHopper,r=1,c=1]
have not tested yet