I think (though I might be wrong) charging of Apple hardware detects usage patterns and it would already not charge the battery to 100% if you’re frequently plugged in.
But that only applies if you have a "charging routine", e.g. you always charge overnight and use it on battery all day long starting at 9:15 am:
"When the feature is enabled, your Mac will delay charging past 80% in certain situations. Your Mac learns your charging routine and aims to ensure that your Mac is fully charged when unplugged."
But in my experience, the feature doesn't do anything if your Mac is just usually plugged in. It simply stays at 100% because there's no routine for it to learn for when you tend to unplug it.
But that only applies if you have a "charging routine", e.g. you always charge overnight and use it on battery all day long starting at 9:15 am:
"When the feature is enabled, your Mac will delay charging past 80% in certain situations. Your Mac learns your charging routine and aims to ensure that your Mac is fully charged when unplugged."
But in my experience, the feature doesn't do anything if your Mac is just usually plugged in. It simply stays at 100% because there's no routine for it to learn for when you tend to unplug it.
[1] https://support.apple.com/en-us/102338