Wifi Gate Opener

BeePee:
WiFi.softAP(ssid, password,1,1);

,1 for channel and the second ,1 for hidden ssid.

after removing the ,1,1 the wifi was stable and adding some more code for fixed IP, channel, and mac address, the wifi connection became fast and quite reliable.

My best guess is that the channel chosen is the problem. Just about anywhere in populated areas you will be able to pick up a dozen or more networks - get a WiFi analyser, I used to have one long time ago for my phone, and you can see where there's space in the spectrum, or at least the lowest interference. WiFi hosts are supposed to select their channel based on where they expect the lowest interference, and I would expect the ESP8266 to do just that if you let it, while channel 1 may have a strong competitor in the air.