Oof. I think I can visualize what kind of situation you're describing... and know that pain all too well but without getting into details - I've never found an efficient way to recover from an orphaned Staging folder (which has lost the install/metadata connectivity) - except to be mindful to not break, again. All I can add is; I've learned to build each profile that's important to me into their own draft collection, so I can always revert Staging folder to an uninstalled state and automate their entire restoration.
Currently, I'm sitting here dropping 5578 archive into a new fallout new vegas set up...
but thankfully, I've got 7 highly curated drafts ready to install stuff, once they're added