Forty-BotThis will give incorrect results. You need to use respawns and not deaths, since you always respawn at the start of each round. Unfortunately, this is not recorded by logs.tf. Really, the only way to fix this would be to use an alternative parser.
Just had a look at a log file (link, vod) and it turns out neither of us are right - it almost measures the time between spawning and healing damage (ie not just buffing someone on rollout) but that doesn't seem to be what it's actually doing. Looking for
"4.T Domo<3><[U:1:96525192]><Blue>" triggered "first_heal_after_spawn"
and working backwards, we see that on the first mid, it took Domo 20.1s to trigger this (healing toemas). Before that happened, he buffed players from full health to rollout, healed papi from his pocket rollout, then at mid papi took damage and was healed (though not enough damage to remove his buff). Finally, toemas took damage from the other team, taking him below full health, and was healed by Domo to trigger the log event.
I've not checked in this detail on other logs, but this suggests "Average time before healing" is time before healing damage done by the other team to take a player below full health, and as such is not only difficult to reverse engineer but also mildly pointless.