As mysteriously as it broke, this WordPress site has fixed itself again. I got an email saying it had automatically upgraded, and I went to look at it, and other than the debug messages I had turned on, it was working again. I didn’t get round to investigating it much, but some of the logging implied there was a duplicate ID in the wp-options table (two rows in a database should never, ever share the same ID). Sort of implies an error in the MySQL, because the database engine shouldn’t really allow those rows to be created, whatever the calling code tries to do. Anyway, perhaps something in the update caused a regeneration of the tables at a level that cured it (even though database repairs in both WordPress and MySQL hadn’t worked).
Better take a backup right now!