This actually depends on the amount of haste you have and the distance from you to the grounding totem. As flarebrass said above, any spell traveling through the air will hit the grounding totem until the totem actually dies.
If shield reflect/grounding is up, only the first tick of penance will be grounded/reflected, the next 2 ticks will attack the target.
If your penance ticks happen close enough together (i.e. pi+haste trinket) and there's enough distance between you and the totem, the second tick can leave your hand before the first tick reaches the grounding totem to kill it, consuming both ticks.
On a side note, mind soothe does NOT consume grounding totem even though the totem "IMMUNE"s it.