This is a collection manager that I created for my larger addon Advanced UI Menus (https://blenderartists.org/t/addon-advanced-ui-menus/592865). I believe I read somewhere that blender was looking for a better way to work with collections in the 3D Viewport; so, this is my solution to that problem.
This addon provides a popup window that includes a treeview (made out of a UIList and operators) with functions to add collections and subcollections, rename collections, move objects to collections, exclude collections, restrict selection on collections, hide collections, and remove collections. It correctly handles collection chains and allows you to isolate collections by shift-clicking, and you can move objects to multiple collections via shift-clicking as well. The addon will also show you what collections are visible and what collections the selected objects are in. In addition it will not allow objects to be removed from all collections entirely. All of the functionality is documented by tooltips, so if you open the collection manager and just hover over stuff you will be able to easily learn all of it's advanced functionality. And as a final note, the window will size itself based on the depth of collections so nothing gets squished.