The problem was me not specifying the pgp_key argument and using encrypted_ses_smtp_password_v4 attribute instead of encrypted_secret in the output. I did not read the documentation carefully telling that the attribute will only be generated if pgp_key is specified.
Things seem to be working now and the secret key gets generated.