Can you repeat this process, and it always shocks you? Are you sure it's a electrical shock?
The reason I ask is because I thought my ZMax shocked me as I was taking a vape and moving my fingers over the device. Until I saw blood on my hand and realized I had cut myself on the rough vent slots in the side of the tube. I sanded the edges down and now it's smooth and comfortable, but when I first got it the edges were very sharp.
Just throwing that out there... I remember people saying their Vivi Novas were shocking their lips, which made zero sense as how can a plastic drip tip shock you. Then someone realized it was actually hot juice that was hitting their mouth and they just thought it was an electrical shock.
Not making a judgement on your ability to determine an electrical shock or anything, just bringing another idea to the table.
Although you did say electrical burn and not a shock, so it sounds like something bad is going on. A bad battery shouldn't cause this, unless the battery's wrapper is cut somewhere and its getting shorted out. What's more likely is that there is a bad connection on the end cap. The negative connection goes from the base of the battery, to the spring, from the spring to the cap, and from the cap, through the threads, into the main body of the device.
If the threads are dirty, or there is some debris in there, it's possible the heat is coming from the current passing through a very tiny point in the threads that's giving it too much resistance, basically turning it into a heating coil due to its resistance.
Just like if you are passing current through a connection point, and that connection point isn't firmly making contact, it will begin to heat up. A plug that is just barely touching the contacts inside a wall outlet (mains? for those euro folks) will begin to heat up, as the connection isn't good enough to allow the current to flow freely.
I'd clean your threads very well, and maybe even put a bit of conductive grease on them if you can. That should ensure the connection between the threads is good.