After recovering from a miserably failed automatic upgrade by restoring a backup, and then trying a manual upgrade, I had to fix the .htaccess file again to make it work correctly. Apache says “Options are not allowed here” so I commented out the two lines that used Options.
Now Nextcloud always shows the message “Bei der Code-Integritätsprüfung sind Probleme aufgetreten.” at the top of each page. A listing shows that the .htaccess file was modified and two extra files in cgi-bin were found. That is correct and totally required to make Nextcloud work at all.
Can I get rid of this check? Alternatively, can I teach it that what it found was not unexpected but correct and necessary?