But I think I see what you mean, and maybe Purr Data has implemented something similar. They have this [ab] object. For reference: "The [ab] object is accompanied by a number of supplemental objects (abinfo, abdefs, abclone) which let you inspect and clone private abstractions. There’s also an “Abstractions” dialog which can be accessed via the Window menu. This will give you a quick overview of the private abstractions contained in a patch. Also, it will show you private abstractions which aren’t currently being used (i.e., don’t have any instances), so that you can select and then delete them if they aren’t needed any more." (from https://agraef.github.io/purr-data-intro/Purr-Data-Intro.pdf )

Yeah, that was a Google summer of code project I mentored two years ago or so. It would be great if it or something like it could propagate upstream to vanilla. It's been long enough now that I don't remember a lot about the code, but we worked really hard on it to make it work sanely with other stuff. One reason we didn't extend this feature to regular pd subpatches was that it turned out to be really useful to maintain a distinction between encapsulation types with global $0 locality on one hand and local $0 on the other.