HA and Automatic Failover with PostgreSQL
pgPool is a client tool that can reroute client connections to the surviving server aftet the primary has died. However, without further activity, that surviving server will be a streaming replication standby, that is a read-only server.

You also need some software that can reliably detect that the primary server is down and promote a standby server. Such a clusterware is an integral component of a high-availability setup.

Probably Repmgr can serve that purpose; typically, Patroni is used.