How to measure AC current using ACS712 and interface with ESP32?
I think your statement about stepping down from 5v to 3.3v is confusing but it looks like your issue is solely with the output of the ACS712 AC current sensor which nominally outputs 0V-5V to a microcontroller ADC corresponding to a range of -20A to 20A through the sense inputs of the ACS712. 

In a normal setup with ACS712 providing your current reading to a 0-5V ADC (on an Arduino), you'd expect a current of 0A to correspond to a voltage of 2.5V at the microcontroller ADC input. 

The issue here is that the ESP32 ADC inputs only go up to 3.3V and would give an incorrect maxed out reading for anything over about 6.4A:

((3.3 - 2.5V) / 0.125 V/A) = 6.4A


So, if you only need to read less than 6.4A you could theoretically use the ACS712 as is shown in any example circuit for the arduino setup without any kind of extra op-amp, buffer or voltage divider.

The other alternative is if you need readings higher than +6.4A but you only care about polarity going in one direction you can reverse the polarity of your inputs through the current sensor so that instead of a range of -20A to +6.4 you get -6.4A to +20A.

The result would be that your 0A still reads 2.5V but 10A reads 1.25V to your ESP32, 20A reads 0V to your ESP32, etc.. then within your microcontroller code you just invert the sign of your reading.

Depending on specific issues of porting that arduino sample code to the ESP you may run into issues with the ESP ADC input trying to automatically rescale itself from the expected 0V to 5V on the arduino down to the ESP32 0V to 3.3V range but if you can read the raw voltages coming into the ESP32 you should be able to do a simple linear conversion yourself:

Input V to your ESP32 ADC = (Sensed A * 0.125 V/A) + 2.5

E.g.: 
      5V = ( 20 * 0.125 V/A) + 2.5
    2.5V = (  0 * 0.125 V/A) + 2.5
      0V = (-20 * 0.125 V/A) + 2.5


In other words (Input V to ADC - 2.5 ) / 0.125 = Sensed Current at ACS712 and then flip polarity/sign of the output as needed.

Note: You don't want to get yourself into a situation where you may accidentally damage a 3.3V ADC by providing a 5V input but the ESP32 seems to be fairly tolerant of the 3.3->5V overvoltage on the inputs and our intent is to not actually get close to that by providing anything from -6.4A to -20A after reversing the polarity of your ACS712 inputs.