Another update for everyone:
after tons of PHP code execution/debugging, source code browsing and internet searches, I have finally found out what causes the PWA "Unable to generate the key." error when generating VAPID keys. It turns out that the problem was indeed FreeFlarum related (unfortunately, there was no easy way of telling that because the logs didn't contain any specific error messages or hints at all).
We run all forums in an isolated environment to prevent possible security vulnerabilities (chroot), and the OpenSSL configuration (which is required for keys to generate) was missing here. AFAIK, it was always missing, so I guess that the key generation changed and made the config necessary.
So, I've included the config at our master forum, synchronized my test forum and the key generation worked. I am now synchronizing all forums, and when that is done (cca. 3 hours, newest first), please let me know whether or not PWA works for you - thanks! Note: you need to press the button to "Reset VAPID keys".