Disabling power button restart
Disabling the power button and changing the volume_up button to power did end up working (i.e., prevents faulty restarts at random times.) I also verified that long pressing the actual power button does end up restarting the device, which means that restart is somehow programmed at the hardware level.