To keep your vape pen battery clean, every so often you’ll want to do a thorough wipe-down with isopropyl alcohol. This prevents dirt and other remnants from getting caught in the thread and disrupting the connection.
Once a week, or more, depending on your frequency of use - dip a cotton swab into rubbing alcohol. Gently wipe down the inside of the battery coil with the alcohol-soaked swab, and use the other end to dry it.