Remarkably, the Lord is able to be selective with his punishments. Wars, famines, and plagues affect the lives of everyone in society, but the wicked are the first to go. In the days of Amaron, the record states:
’…the more wicked part of the Nephites were destroyed.
For the Lord would not suffer, after he had led them out of the land of Jerusalem and kept and preserved them from falling into the hands of their enemies, yea, he would not suffer that the words should not be verified, which he spake unto our fathers, saying that: Inasmuch as ye will not keep my commandments ye shall not prosper in the land.
Wherefore, the Lord did visit them in great judgment; nevertheless, he did spare the righteous that they should not perish, but did deliver them out of the hands of their enemies.’ (Omni 1:5-7)
The same process of selective destruction will attend the Second Coming. All will be affected by the great destructions that have been prophesied, but the destroying angels specifically target the wicked. The other way in which the destruction is selective is that the righteous are gathered out from the wicked, hence the charge, ‘Go ye out from Babylon’ (DC 133:5). Similarly, the Lord has warned, ‘I will not spare any that remain in Babylon’ (DC 64:24).
Joseph Smith
“the destroying angel will…exercise his tremendous mission upon the children of disobedience; and destroy the workers of iniquity, while the Saints will be gathered out from among them, and stand in holy places ready to meet the Bridegroom when he comes.” (Teachings of the Prophet Joseph Smith, p. 92)