Thank you for asking this, Ben. The superserver is not the first process and comes after auxiliary write daemons. I also found multiple cases for instances that upgraded from Caché to IRIS where the first process uses cacheusr but the superserver uses irisusr. So this will not work. I think we may be stuck with looking for the superserver process.
I found no direct documentation but got some information from the method documentation of the NextProcess class method in %SYS.ProcessQuery:
https://docs.intersystems.com/iris20243/csp/documatic/%25CSP.Documatic.c...
So, it seems passing an argument works like $order on the list of running processes with the caveat a halted process is treated like $zjob("") and returns the first process id in the list. I think this will do the trick, thanks Alice!
See my reply to Ben, below. Unfortunately it seems the first process is not necessarily correct for instances with an upgrade history from Caché to IRIS.