Since I am guessing they turned it off and let it cool this usually means it needs repair. The iPhone 6 I picked up refurb (64GB) was 199USD and Apple's exchange rate at the time was higher than that so you need to consider costs.
My friend got this iPhone 6 which is working perfectly fine until recently. Now she could not access to camera and some kind of error pop up saying
"Flash is disabled. The iPhone needs to cool down before you can use the flash"
She tried the "erase all content and settings" but it did not work.
Help is appreciated.