PgAdmin 4 - How to connect to database using unix socket via ssh tunnel?
That should work fine with the correct ssh command.
To forward from a local Unix socket to a remote one runs
ssh -L /tmp/.s.PGSQL.5555:/var/run/postgresql/.s.PGSQL.5432 -N laurenz@dbserver

Then you would use host /tmp and port 5555 to connect.
To forward a local TCP socket to a remote Unix socket, run:
ssh -L 5555:/var/run/postgresql/.s.PGSQL.5432 -N laurenz@dbserver

Then you would use host 127.0.0.1 and port 5555 to connect.