ESP32 ADC measurment with variable input voltage?

At full charge, the battery voltage can be as high as 3.65V, which could damage the input. Connecting the battery directly to the input may be "commonly done", but that is not a positive recommendation.

In any case, the ESP32 ADC is defective and nonlinear, so it is not very useful for making accurate measurements.