Reconstructing a Corrupt Photos Library
I think if I had tried all else, and if it were still a mess, I would try this rather "awkward" process--but only if there is a backup, of course. In general, it is a very bad idea to mess around inside a Library Package! The database needs to know where each files is located, and moving, deleting, or changing files can cause irreparable damage. You would do this only if you have reliable backups!
So, if you've decided to go ahead, then right click on the Library, and choose "Show Package Contents"
to see something like this:
The Originals folder has all your original unmodified pictures, but their file names have been changed to a GUID (Global Unique Identifier) to avoid name duplication. These names are pretty useless to us humans, but the pictures and their metadata are unmodified.
Then, create a new folder and transfer these items one at a time to the new folder. If, in transferring "resources" for instance, you get an error, then open that folder so see this:
and transfer these folders one by one, perhaps finding the one that caused the error. The "renders" folder, for instance, may contain full resolution edited versions of most of the pictures, again with GUID names.
If you find a problem file, you might try to open it in Preview or an editor like GraphicConverter ($40) or whatever you have, and save a clean version. If you have to, you can simply skip a file that is causing the trouble, and that might work.
Again, this is a last ditch solution, and it may not work, anyway. You would only do this if there are no other reasonable choices. And never mess with the innards of the Library Package without a reliable backup!