What about modern devices (such as laptops) that have a fixed battery? They shouldn’t rely totally on software to force a hard power off because that’s not safe. If the software hangs you cannot power down
The EC (embedded controller) controls the hard power off on a modern laptop, not the OS at all. That's why you can still power down in the event of a device lockup (thankfully).
Some laptops have a battery reset button for cases like this. For example lenovo has a pinhole where you can press a tiny button using a paperclip.
https://devblogs.microsoft.com/oldnewthing/20250107-00/?p=11...