I was having the exact same problems with my S4 as well. Horrible battery life and overheating for no apparent reason. It got to the point that I went back to using my old HTC even though it was an old Gingerbread model. I had tried just about every fix I saw posted on various forums with no real improvement. I even went as far as demanding (and getting) a replacement S4 and a new battery from AT&T. The problems did not go away though.
Along the way I learned that Kit Kat made some big changes in the way the phones interact with a SD card. In a nutshell, the older versions of the os allowed apps pretty much unrestricted access to all folders on the SD card. Apps and data could install themselves anywhere when moved and they did just that. Kit Kat, however, requires apps to use specific app folders that are designated for that app only. So far so good. Here's the problem, if you upgraded from a previous version of the os (as many of us did), the legacy data from before the upgrade is now in the wrong place as far as Kit Kat is concerned I believe. When you phone tries accessing these folders, that are now off limits as far as Kit Kat is concerned, problems happen. Since I was out of good options and I had largely given up on the S4 anyway, I decided to cut the Gordian Knot so to speak. First I erased reformatted (unmounting and remounting) the SD card completely. All apps, music, data, etc-gone. I obviously made a point of backing up just the music but everything else was erased. I then did a factory reset of the phone itself. This is the one where you turrn off the handset completely (hold down power and select turn off). Then, once off, hold the power and volume up buttons until a small bit of blue text appears in the upper left corner of the screen. Release those buttons as soon as that text appears. A small android animation should appear followed by a menu. One of the choices, Factory Reset, completely wipes the phone.
After doing these rather drastic steps, I proceeded to start using the phone again. This time, I deliberately tried to overstress things. Specifically, I copied 450 songs over via the USB cable, installed about 30 apps and did a full MS Exchange sync simultaneously. The result, nothing. No overheating problems at all. It has been a few weeks now and the problem has not resurfaced under any conditions. Really a night and day kind of change. Where the phone was a barely usable hand warmer before, it is now really good.
While I cannot say with complete certainty what was going on, I believe that certain apps do not play well with Kit Kat. Those apps, which unfortunately put their data in places on the SD card where they cannot go, essentially left the phone fighting with itself as the app said to do one thing and the OS said to do another. Unfortunately, without knowing all the apps that have this issue, the only sure solution that I could see was to start over completely. I know it is no one's idea of fun to have to take steps like this but, to date, it has completely eliminated the problem.