Of course, if God decides to destroy a particular people it is a judgement and is not murder. God is a GOD, after all, and He knows best about those things. It is really no different than a shepherd deciding which sheep to cull from the herd.
How does the shepherd to the culling? Based on what?
Obviously he uses his own criteria and superior knowledge of the “big picture” which the sheep have no clue about.
So much more so for the INFINITE Creator of space and time Who knows the End from the Beginning.