Yeah it's a but unreliable for me too -- especially with the battery management.
I plan to turn the phone into a dedicated pihole device in a chrooted arch linux install¹. Given the battery issues², I will probably buy a bluetooth plug socket and use it to the power the phone, where I will then write a little script on the device that manually checks the battery capacity³ and if it's too high, it tells the the plug socket (via bluetooth) to switch off, and if too low to switch on.
[Footnotes]
- 1: which maybe I will directly flash onto the device later?
- 2: i.e. never leave the device to charge in pmOS because i
- 3: cat /sys/class/power/
/capacity
Source