If you want to keep the laptop plugged in all of the time but not kill the life of the battery, then try charging the battery to about 40%, placing it in a ziplock bag and storing it in the refrigerator. Take it out every 3 months and cycle it to keep it working great.
What the fu.ck, don't do that, that's just asking for condensation. Most modern laptops don't lose charge level over time. See this. Any "advantage" to keeping that tiny percentage of battery life is offest by the fact that you do not have a battery plugged in, this is no longer a laptop really and any slight disturbance to the power cable will kill your computer and screw things up more than a possibly reduced battery life could.
To be honest if you think your laptop is getting hot enough to cook its battery, then you may as well have a desktop PC. As I said before keep it on AC, besides batteries generally aren't that expensive and if you value your laptop that much you won't mind replacing worn items)
plug out the charge when the battery is full, keep the screen brightness as low as possible, undervolt cpu/gpu(?), keep the running program minimum. keep the laptop as cool as possible,but not too cold just dont using the laptop with battery out bcuz it will damage your laptop (so badly!) if the current voltage wasn't stable