I still have an Intel-based MacBook, which does not seem to support limiting battery percentage to something like 80% while plugged in (it always charges to 100%), so I finally looked into it, and apparently there are third-party tools for that. I tried AlDente, and it seems to get the job done: