Atheist Advocate (AA): "If God is all-just, why does he punish/kill massive amounts of people throughout the Bible for the sins of one?"

Examples:
*God murdered 70,000 Israelites by inflicting them with disease because one man, David, conducted a census
*God punished Egypt with 10 plagues, which included murdering all male first-born babies because God had a vendetta against Pharaoh [whose heart was hardened by God so that Pharaoh could not release the Israelites even if he wanted to]

[How do you answer this Atheist Advocate?]

image