As it happens, just after I posted the previous message, I got a message from my hosting provider that one of my wikis still uses PHP 7.3, so I updated it to PHP 8.0 and promptly ran into a nasty error ...
After a couple of hours of trying to find the error, I decided to start from a clean slate, and I set up a fresh LAMP stack on an Ubuntu VM, including PHP 8.1 ... and it all works without a problem. So now I need to check which of the dozens of plugins I'm using is causing the trouble.
In other words: it is not always clean sailing with PHP 8, but at least the core system seem to be compatible with PHP 8 :-)