Issues with Local Tuya - Doesn't recognize all lights when they turn on

I’m using LocalTuya to control about 40 6-inch can and wafer lights in my house. The lights are turned on/off with a Kasa TP-Link light switch, but I also want the Smart light functionality for RGB and in order to individually dim or turn off lights in my theater room.

My issue is that when I turn the light switch on to power the lights I always have a couple that never show up in HA as available. Some lights are slow to connect (take as long as 1 minute) to WiFi, but even then, they still show as unavailable in HA. I can see they are connected in my Unifi dashboard. I have even tried reloading the LocalTuya integration after seeing the lights online but they still show as unavailable.

I’ve been fighting the reliability of the lights connection to WiFi and HA for awhile. I think I have the WiFi issue solved but still have a problem with them showing as available in HA.

Am I the only one having issues? Or is this a problem other people have? Just trying to find out if I can solve my problem or if I need to find different lights or change the chip in the lights to an ESP8266.