pwm pin 6 quit working

I have a mega2560 and had a uno, I am using them for a r/c car i put the brand new uno on it i use pin 6 and 9 for the esc it ran for about 10 min, then pin 6 stopped working. I used many different sketches all with the same results, changed the pin and everything works, i returned the uno and went back to using my mega, about a week into using the r/c car the same thing has happened to the mega and i have no clue what is going on. I don’t want to keep using it and this happen to another pin, does anyone have a solutions?
thank you
Robert

What’s connected to pin 6?
Does the chip feel warm or hot? That’s usually a good sign the IO pin has been fried, and it’s just a matter of time until the rest goes.

The ESC was cheap yes? I've had one explode when first powered up, don't expect
them to always work properly.

Next time you connect a pin to the ESC, add a 4k7 resistor in series to protect the
Arduino - this (hopefully) won't cause issues with the ESC but will protect the Arduino
from voltage spikes. If it doesn't work try 1k instead.