This is a list of common defective parts that can cause the ESC light to go off or malfunction.
From an article I found for troubleshooting ESC systems
1-Brake light switch. A defective brake light switch can trigger the ESC light. This is a common problem. Easy to replace and inexpensive.
2-A bad wheel speed sensor. Clean or replace the ABS sensor.
3-ABS module malfunction. Needs to be properly diagnosed.
4-Steering angle sensor. Sensor may require calibration.
From an article I found for troubleshooting ESC systems
1-Brake light switch. A defective brake light switch can trigger the ESC light. This is a common problem. Easy to replace and inexpensive.
2-A bad wheel speed sensor. Clean or replace the ABS sensor.
3-ABS module malfunction. Needs to be properly diagnosed.
4-Steering angle sensor. Sensor may require calibration.