816
Engineer turns disposable vape pen into a working web server
(interestingengineering.com)
This is a most excellent place for technology news and articles.
There is also a battery management system as well.
M0 processors are dirt cheap, especially in bulk.
They probably have a BMS library that takes a few Kb of flash.
The time it would take to make the design cost effective wouldn't be worth it.
Slap a less than a dollar mcu and be done with it.