A way to do it cleanly, which would not require massive rewrite of code is to include chest type name in its merged variant. But that would break all previous save because I can't find if it is possible migrate all merged chests to their correct new name. I'll check some more if it really is impossible. If it would be possible I may actually implement it.
Then there is a messy way of doing it. Holding data about all merged chests in global state but that would explode the save file size, as you said, as well as require me to rewrite a lot of the merging code.