You didnt explain whats working well or what issues you are experiencing. Lucky for you, I bothered to look into it anyway.
There is no reason to use a wait in the first trigger. In the extremely rare case someone leaves during that 0.01 wait there will be issues. A 0.01 wait is more likely ~0.03-0.11 actual time. Other than that the first trigger gets the job done well enough.
The math is wrong in the second trigger. In a full game it will work for the first leaver, then get progressively worse the more people that leave.
Imagine a game starting with 5 / 10 players and a unit with 100 hit points. That would be 100 x 0.5 = 50. Then if another player leaves it would be 50 x 0.4 = 20.
One option is to first re-calculate their Max HP to their default Max HP before reducing it again.
Player leaves the game
Set Max HP of unit to (10 / 5) x Max HP
(2 x 50 = 100)
Set Max HP of unit to ((5-1) / 10) x Max HP
(0.4 x 100 = 40)
Set Number of Players = Number of Players - 1
Since you are working with integer values they will never be exact and will get progressively offset the more people that leave. I put it out there so that you dont get surprised when the Max HP or Base damage from game to game may differ a tiny bit. If you re-calculate the default Max HP to a real variable instead of actually setting the HP in the first step it will be more precise and efficient.