Database corruption

You’ve still got database corruption:

Apr 25, 2023 20:58:03.143 [0x70000f1bd000] ERROR - [Req#685] SQLITE3:(nil), 11, database corruption at line 84326 of [a29f994989]
...
Apr 25, 2023 20:58:03.143 [0x70000f1bd000] ERROR - [Req#685] SQLITE3:(nil), 11, statement aborts at 34: [select taggings.id, count(*) as taggings_count from tags   join taggings on taggings.tag_id=tags.id   join taggings as related on taggings.tag_id=related.tag_id   join metadata_items on metadata_items.id=related.metadata_item_id  where taggings.metadata_item_id=? and metadata_items.library_section_id=?  and tags.tag != ''  group by taggings.id;] database disk image is malformed
Apr 25, 2023 20:58:03.144 [0x70000f1bd000] ERROR - Got exception from request handler: sqlite3_statement_backend::loadRS: database disk image is malformed

That’s going to need to be dealt with before you try to fix anything else. You may want to give @ChuckPa’s excellent DBRepair.sh script a shot.

If the database cannot be repaired, your best bet would be to restore your most recent good backup.