Having used HAProxy for 15 years commercially, I absolutely agree with this. There are lots of complex features of HAProxy that only a dedicated proxy can provide. The acls, deep packet inspection and stick tables are a few.
Whilst it doesn’t directly “serve” PHP or Python - it’s a load balancer so can just have regular Apache or nginx backends serving content which is arguably its main use case. For homelab this doesn’t always make sense but I would pick nginx for high traffic commercial environments.
I had a similar issue and it related to the uplink connectivity monitor. Unifi monitors the gateway and controller IP and withdraws the SSID if it can’t contact either of them. Make sure you have turned off wireless meshing on the device and I think you can manually disable the uplink connectivity monitor.