Chosen Solution
I think its the battery goes dead quickly throughout the day not too too worried i have recently gotten an iphone xr. but i would like to fix this issue for my friend.
Definitely replace the battery first. If this does not solve the issue, try a restore to factory. If all else fails, it could be a board-level issue. I have seen this behavior for the Note 4 and 5 as well.