Depends on the ESC. Some have thermal protection, but as far as I know many don't. Even with thermal protection I wouldn't assume it will prevent all overheat damage. Best to get an inexpensive temp gauge and use it on both motor and esc, especially after making a change. One example, there are other brands too:
FlashPoint infrared temperature gauge