Thank you GenoMax, if I have well understood the retmax parameter and 10000 entries limitation are linked to the R package, and not to the command line EntrezDirect.
I have re-written the script to accommodate it:
# Define search term and database
search_term <- "large[All Fields] AND subunit[All Fields] AND ribosomal[All Fields] AND diatoms[All Fields]"
db <- "nucleotide"
# Use Esearch
system2("esearch", args = c("-db", db, "-query", search_term, "|", "efetch", "-format", "uid", "|", "awk", "'{printf \"%s,\", $0}'", "|", "sed", "'s/,$//' > ids.txt"), wait = TRUE)
# Use Efetch
system2("efetch", args = c("-db", db, "-id", "$(cat ids.txt)", "-format", "fasta", ">", "sequences.fasta"), wait = TRUE)
# Cleanup temporary files
file.remove("ids.txt")