How to correctly (good practice) generate gpg keys in batch mode (unattended) WITH a passphrase
I finally found the answer by reading the whole manual.
$ man gpg says around line 1944:
--passphrase-fd n
Read  the passphrase from file descriptor n.
and
--passphrase-file file
Read the passphrase from the file.