Such table makes perfect sense. But updating it while an activity is running is overkill IMHO. Update it when workflow is completed (as a last activity) and query workflow directly while it is running.
. Is there an api that allows you to query things like the size of the history logs, etc or is it just a case of monitoring how quickly the storage fills and setting a cleanup policy around that?
I don’t think such an API exists at this point.