Here's where the real question comes. What should reset the counter? Because there are lots of ways you can reset it. Death and respawn is only one (and it can come in various ways: tk, suicide, feed). You can respawn as soldier then as builder. You can switch team or spectate then rejoin (yeah you lose all your stuff but you don't care anyway, all you want is to speedbuild). You can even reconnect and rejoin.
You can't possible keep track of the counter across all these situations, not just because it's often impossible, but because it's silly too.
Getting rid of the timer altogether is not good unless you're ready to offer an alternative, because it's the only thing preventing speed-building to any extent.
So I'm afraid I don't see any solution to this case of bending the rules. It may just be one of those things that needs a human referee to notice and punish it (like evil deconning).