I'll be damned!
It's neither the type of computer/operating system, nor the Joomla/PHP/SQL at fault.
I tried today on my local server on a new Joomla 4 with only the JCE (2.9.18beta) installed, and had no problem in creating a new profile.
The other Joomla 4 installation still exhibits the error message I mentioned in my previous post,. This installation is an upgrade from Joomla 3 to Joomla 4 with all extensions involved upgraded to their Joomla 4 versions.
I gradually uninstalled all no Joomla extensions. Neither the uninstallation of all other extensions, nor the uninstallation of the JCE and its installation again solved the problem.
I can't be sure if the problem is due to a leftover code from the other extensions or from the upgrade from Joomla 3 to Joomla 4. More tests are needed.