The deployment that is described in the docs feels more like a workaround rather than anything else. There have been discussions in the past about how to solve properly support HA proxies [1,2]. Honestly I’m not fond of adding more functionality to the workaround.
Does proxy need to know behind what load balancer it is running for any other reason than reporting it to foreman?
[1] - Supporting HA Foreman Proxies
[2] - Highly Available Smart Proxies (part 2)