H-Bridge 2-wire fairy light controller

How did you disable the logger?

If you have this in your esp yaml, remove it or comment it out, like this:

# Enable logging
# logger:

Quite old question, but one hint, did you try to change LEDC frequency on Esp32?
By default is 1000Hz (according to: ESP32 LEDC Output — ESPHome)
Just try to play with that, reduce or increase (as i remember, L298N can take max 40KHz).