Okay so after multiple file integrity issues ("X does not exist"), I opted to install a new Matomo instance, and migrated the data from old to new. It seems to be working well and passes all system checks now. I think this can be marked resolved. I still don't know how it ever got into that state, but it's good again.