As you have discovered, the estimates of time left to complete the print are only that - estimates based on what has already happened then extrapolated to predict the time remaining. However, this all assumes that what has yet to happen gets completed at the same rate as what has already happened, which isn't usually the case.
IMO, the only way to get an accurate indication of time remaining is to first run a simulation of the gcode file to calculate the time required to print that particular object, then subtract the time elapsed from this. There was a thread on these forums somewhere by someone who had written something which would do this simulation, or least calculate an accurate time to print a given gcode file. So, if you are making a stand alone progress bar type of thing, then you might be better off using this approach, rather than use the DWC estimations.
Looks like it was this: https://www.duet3d.com/forum/thread.php?id=1698&p=1
I will look into that as well, and I agree, simulation will most likely be the most accurate way of determining the print time. I will have to look into this more deeply. Thanks for the info again!