Collection Compactor
Download the .zip (don’t unzip).
Blender ➜ Edit > Preferences > Add-ons > Install…
Select the zip, click Install, then enable “Collection Compactor”.
Open the Outliner ➜ find the “Collection Compactor” panel.
Tip: If updating, remove the old version first to avoid duplicates.