I never worked with the Blizz equipment manager, but I think it would be possible - gBags already filters the items which are used in some equipment set, although they all go in one bag and not in multiple. But I guess you could somehow extend this.
Filtering for these so called "subType"s is supported, you can access them via item.subType == "Flask". You can find a complete list of types/subTypes
here. Notice that they are localized.