Presumably the folders/albums organistation would be lost through an export/import cycle?
Not necessarily. osxphotos can preserve the folder structure (and the metadata such as keywords, etc.) on export and, if you use the osxphotos import tool, it can preserve these on import. For example, assuming you are exporting to your "~/Pictures/export" folder:
Bash:
osxphotos export ~/Pictures/export --library /path/to/Photos/library --directory "{folder_album,No Album}" --sidecar json --person-keyword --keyword-template "{favorite?Favorite,} --report photos_export.csv --verbose
This exports all photos to "~/Pictures/export" while preserving folder/album structure (photos not in an album will end up in "No Album" folder), creates JSON sidecar files with the metadata, creates a keyword with each person tagged in the image (faces/persons are one thing that cannot preserved on import due to limitation in Photos), and adds a "Favorite" keyword if photo is a favorite (osxphotos cannot yet preserve favorite status on import so this allows you find your favorites after import and mark them as favorite). It will create a report in CSV format of everything that was done named "photo_export.csv". You can run it with the "--dry-run" option first if you like to see exactly what will happen.
Then, after exporting, create a new Photos library (or open an existing one if you want to import into an existing library) and open that in Photos and run this to re-import:
Bash:
osxphotos import ~/Pictures/export/* --walk --album "{filepath.parent}" --split-folder "/" --relative-to ~/Pictures/export --skip-dups --dup-albums --sidecar --verbose
This imports all the photos from "~/Pictures/export". It will use the directory (relative to ~/Pictures/export) as the folder/album. It will read metadata from the associated sidecar and use that to set keywords, etc. in Photos, it will skip previously imported duplicates (photos can belong to more than one album and would be re-imported as new photos if not using this option) but it will file photos in the appropriate albums so a photo in two albums on export will end up in the same two albums on import. Of course, you can also run this with addition of "--dry-run" to see what will happen before actually importing.
What you will lose: edits will be imported as separate photos, favorite status won't be set (but favorites will have a "Favorite" keyword), and people/faces tagged in images will lost (but the person's name will be used as a keyword to facilitate searching).
This isn't perfect and I offer it only as a last resort if you can't get Photos to open the library as seems to be the case. It is possible the database is so corrupted that osxphotos cannot read it but a "--dry-run" export will let you know that immediately. You can also run "osxphotos info --library /path/to/library" first to see if osxphotos can read the library.
osxphotos has
extensive documentation and you can run "osxphotos help export" and "osxphotos help import" to get help on these specific commands.