I'm using a 24GB M2 Air running a development environment in Docker, and no problems here. Running several containers, MySQL, elastic search, redis. It feels really fast compared to a 2020 i7 6-core with 32 GB. It doesn't get hot. It's silent. Running the environment cuts battery life, though I still get around 8 hours on a full charge.
No, battery life is measured in change cycles. If you don’t discharge the battery, it doesn’t age as much as if you do discharge and then recharge the battery. At least that’s the case for batteries with reasonable charging controllers like those found in $500+ gadgets.
That's what I'm saying, keeping the charger connected reduces the amount of battery cycles therefore keeping the battery health for longer compared to charging and discharging multiple times.
BUT, you have to disconnect the charger when not using the laptop, for example when you're going to sleep.