Monitoring state of charge on lithium batteries is tricky: looking at the current cell voltage isn't very useful, as the measurement is quite constant over a discharge until it drops off a cliff. This is what happens if you see a charge indicator plummet from 50% to 1% in a matter of seconds. An aging battery, or a replacement that isn't an identical match for the original, are common causes of this.
The only reasonably accurate method of estimating remaining charge is to monitor the amount of current drawn while charging, to work out how much power was stored, and then monitor current/power drawn whilst unplugged. Even this is based on working assumptions about how well the battery is storing its charge.
(Chapter and verse on this can be found at
https://batteryuniversity.com/article/bu-903-how-to-measure-state-of-charge , among other places.)
Even then, calculations of remaining battery time are based on assumptions of how much current you'll be drawing in the future. High-end phones are doing all sorts of datalogging to try to predict this on the basis of past usage: you can often find graphs of this in settings pages. But all you need is a rogue app demanding a lot of cellular/wifi access, or monopolising the CPU, to increase the currrent draw and chop that battery life down.
There are several occasions that I've found my phone feeling a bit warmer than usual in my pocket, because I've accidentally turned on the camera function. Having run the camera module and display for half an hour or so, the battery life has lost a fair few percentage points.
The net result of this is that I am the kind of person that takes printed-out copies of whatever e-tickets I've got, not just railway tickets.