@thomasfuchs Could it be a failing battery rather than a software problem? I once knew an older (2014 model) MacBook Air that consistently died without warning once the battery was down to about 30%. One battery replacement later and it was fine again.