ESP32. - selecting resistors for voltage divider
0.25 ratio? That's 3v into the ESP at 12V. They are fine, impedance wise, but esp32 has a pretty poor ADC, it samples very fast so gets a lot of noise, and is poor linearity best the extremes of range.
Should divide it more, 12v batteries often go up to 14V or more when charging, and you want to avoid the high end of the ADC.
My advice... 100k, 500k (so divide 6) and a100nF cap across the ADC input and ground as close to the ESP as possible.