Ops! I dit it again. 🙁 I’ve solved it on my own.
The previous maintainer of the WordPress site installed the DIsabled REST API plugin.
This was blocking all API endpoints, including /wordfence/v1.
I used “Delete Wordfence tables and data on deactivation” when deactivating.
Then I removed the plugin, before reinstalling it.
No, I’ve not investigate if some table or data was still there.
Diagnostic report sent a couple of minutes after the post.
I managed to solve the problem on my own, by disabling JavaScript on the browser: then I was able to obtain a valid https://www.wordfence.com/plugin/registration/<longcode> URL.