Pretty much, yes. Hit this with a soil sensor last spring.
On the ESP8266 the ADC and the radio share bits of the RF hardware, and calling analogRead() thousands of times a second starves the WiFi stack. It’s a known issue on that core. delay(1) helps a bit because it yields, but you’re still hammering the ADC.
An LDR in a hallway doesn’t change in milliseconds. Read every 100 ms, average ten readings, done:
unsigned long t = 0; uint32_t acc = 0; uint8_t n = 0;
void loop() {
client.loop();
if (millis() - t >= 100) {
t = millis(); acc += analogRead(A0);
if (++n == 10) { lux_raw = acc / 10; acc = 0; n = 0; }
}
}
And if you ever want every sample in Hermetry, don’t publish each one. Collect a minute of them and send one message with an array of {ts, values} records, a message costs the same against the quota whether it holds one reading or fifty.
If it isn't logged, it didn't happen.

