taxon exclude list for searching local blast database using blastn
Hurray, the solution seems already to be implemented in the new BLAST database format (v5), which is usable with blast+ versions >= 2.8.0.

It is possible to specify an exclusion as well as inclusion list of taxon ids, which, however, have to be on species level.

Species level taxon ids can be obtained from higher level taxon ids using the script get_species_taxids.sh, e.g.: get_species_taxids.sh -n Enterobacterales

See docs here: https://ftp.ncbi.nlm.nih.gov/blast/db/v5/blastdbv5.pdf

Edit:
For creating taxon ID lists locally from the NCBI taxonomy files, the program subtree can be used. See example therein for compiling a list of taxon IDs from environmental or unclassified taxa.