If you've read up on the ExportImport script you should have a general idea of what these two scripts do. They can be downloaded as ExportMusicMetadata.zip and ImportMusicMetadata.zip. Unpack the zip files and put the scripts in your downloads folder, or on the desktop, or see https://dougscripts.com/itunes/itinfo/downloadfaqmx.php to allow them to be run from the Music menu bar. The first script will create a text file for selected tracks that exports a number of properties, the second lets you select a text file and it will read in the properties for each track, updating the library where they are different. They were written last August, but I cannot find a related thread where I might have gone into more detail. I assume I wrote them for someone else's benefit but perhaps not.
A quick test last night confirmed I can edit data for a selection of tracks, modify the exported data, and import it updating the tracks as intended. In particular Album and Album Artists are among the fields that are exported and imported.
In your case you want to take your computer off line, restore a pre-corruption backup of your entire music folder, export the metadata for all affected tracks, connect to the Internet and let iCloud Music Library update, which will copy back all of the unwanted changes, then use the import script to reapply the saved data.
tt2