I just wanted to take a moment to thank the Pop!_OS team for all the hard work on both COSMIC and the OS in general. As a software developer, I understand what your team is taking on is a huge undertaking, and I appreciate all the updates and look forward to using COSMIC!
I am adding an update to this post that this is already supported for System 76 laptops! See https://support.system76.com/articles/laptop-battery-thresholds/ for more details.