Until the final attack the system wouldn't know how many attacks are going to be made.
Player one makes 4 consecutive attacks and another player comes along and makes one to kill the base. How does the system know that there are going to be 5 attacks?
Player one makes an attack, Player two makes an attack then player 3 comes along and makes 4 more to kill the base. How does the system know in advance what is going to happen?
In all cases, the system can't predict who is going to attack next nor what the total number of attacks is going to be.
The only way anything like this would work is for the system to record the number of attacks and amount of damage until a base is killed and only release the resources after the base is killed. If it is never killed, then no resources released.
Unfortunately using alts for killing bases isn't their only misuse!