There's the `setproctitle` in FreeBSD that is designed exactly for a process to update the information that is presented to tools such as ps.
https://man.freebsd.org/cgi/man.cgi?query=setproctitle&aprop...
https://man.freebsd.org/cgi/man.cgi?query=setproctitle&aprop...