It was the Apple tech support people who suggested going to the Genius Bar after they had me reboot it. They even set up the appointment. I went twice. The second time was because there was not enough info for them to pull as a result of the reboot. The second time they said to replace it or try wiping it and starting from scratch. The phone hasn't heated up like before and hasn't rebooted itself again. We shall see what happens.
Sounds like your iPhone might have a logic board issue. My iPhone 5 had a similar intermittent issue and I kept it for about 10 months. I finally got tired of the issue popping up and took it to an AppleStore and they swapped it out for a gray box one no questions asked. Ever since then it's been perfect plus my old iPhone had a big scratch on the screen.
If you're going in circles with the Apple tech support people ask them nicely to speak to a senior technician. They can actually open tickets directly with Apple engineering.