pg_dumpall creates an SQL file which is just a simple text file
you can then edit sql removing postgres user from the file
This can be automated in a script that searches the generated sql file for the postgres user replacing it with a blank/empty line or adds -- to the bringing of the line which comments it out.