The conversation from the other thread made it clear that you need to set conn_max_age = 0. I’m not sure why you think it’s just going to “mask the underlying cause”.
Using pgbouncer will reduce (eliminate?) the latency involved in opening the connection each time.