analogWrite() has been implemented for the ESP32 for some time. Behind the scenes it uses ledc
It certainly works for me