Because I was becoming quite desperate I decided to install IE and now it works. Lessons learned:
Edge doesn't help, so please don't recommend Edge in the future any more. You need IE and only IE.
IE can be set to highest security settings.
IE doesn't need to be your default browser.
IE didn't need to be up-to-date in my case, although it is, of course, always recommended for security reasons.
Dear moderators, please forward the following message to the MT5 developers: it's quite sad that your software depends on a program that Microsoft doesn't support any more.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Because I was becoming quite desperate I decided to install IE and now it works. Lessons learned: