TL;DR: can a plugin change the progress and ETA as given by Slic3r's new M73 gcode or does it require a core change?
Prusa's Slic3r PE 1.40 offers a feature that adds M73 codes using a specific format to display the remaining print time on compatible printers:
Slic3r PE 1.41.0-alpha3 combined with our new firmware has this feature already implemented. Starting with the alpha2 release of Slic3r PE, a new M73 code is added in G-codes and the printer will inform the user about the time remaining. This value is refreshed every minute and works both for the Normal and Stealth (silent) mode. Please note you need firmware 3.3.0 or higher.
The format of the new M73 code is the following:
M73 Pxxx Qxxx Rxxx Sxxx
where P is the percentage of the total time already printed in normal mode, R is the time remaining for normal mode in minutes, Q is the percentage of the total time printed in the stealth mode, and S is the time remaining to the end of print in the stealth mode.
I found it to be both quite accurate and quite different form OctoPrint's estimate; even the percentage varies because I think that Prusa's algorithm is based on actual print volume whereas OctoPrint's is likely based on how far into the gcode file it's gotten.
I was wondering if there's any way for OctoPrint to use such M73 format to update its own display of remaining time and percentage; of course it wouldn't be able to know if the printer is in normal or stealth mode, but the normal mode would be a safe default in my opinion. Its usage may be limited to Prusa's printers but I imagine Marlin may start implementing at least the R parameter at some point (P is already supported, and indeed there's a plugin for OctoPrint that injects M73 lines while printing by reading the percentage.)
Could a plugin do this at all? I briefly looked at the docs, and it looks like the current print progress can be detected via on_print_progress(), but I'm not sure if it can be overwritten without changing the "core" code of OctoPrint.