Investigate using/supporting repmgr's "standby switchover" command
Documentation: https://repmgr.org/docs/4.0/repmgr-standby-switchover.html
Supporting/implementing/etc this command makes switchovers easier, as we don't need to run individual commands manually.
This would also help make manual failovers easier. Right now if you perform a manual failover, you also have to manually change all secondaries so they follow the new primary. On the other hand, simply terminating the primary and waiting for repmgr to kick in will take care of this automatically.
One requirement this command has is that it needs SSH access to the hosts. In other words, the host that runs the switchover command must be able to SSH into all other nodes in order to update who the primary is, and who follows who. This doesn't require root access, instead SSH can use the gitlab-psql user which has the ability to run repmgr commands without requiring sudo.