Is God just and/or merciful? I am told, repeatedly, with great intensity and sincerity that YHVH / the LORD is kind and merciful, forgiving of all sins.

Now, I read the Bible enough. God's main demonstrations of power seem to be, in chronological order,


Smiting the enemies of israel
Smiting those who offend his prophets (in one case, a bunch of kids who made fun of Elijah's bald spot)
Smiting those who worship other gods


Often after a natural or man-made disaster, we get a major evangelical religious figure saying that this is the Lord smiting us 'cause we made Him mad.

Now, this behavior in which God partakes would not be permissible for a human being:


If an army officer did this he'd be court-martialed
If a politician did this he'd be voted out/impeached
If a civilian did this he'd be arrested


What is it about the LORD that justifies actions that aren't justifiable for humans?
A few points:

The "bunch of kids who made fun of Elijah's bald spot" were not a bunch of kids, (the KJV's translation is quite unfortunate here,) but a bunch of youths (meaning teens or young men.) It was Elisha, not Elijah, that they were making fun of, and laughing at him for being bald wasn't their offense.  This incident took place soon after Elijah's ascension into heaven, and they were telling him to "go up, thou bald head."  In other words, "hey baldie, if your master could go up to heaven, why can't you do it too?"  Insinuating that God's chosen servant didn't have the power of God with him as his predecessor did was their sin, and it was a pretty serious sin indeed, because it can lead others around them away from the Lord.

Also, it says that there were over 40 youths involved in the incident.  That's not "a bunch of kids," it's a small mob, and "mocking" in Old Testament times was not always confined to simple verbal taunting.  They could very well have been putting the prophet in physical danger.  One man, old enough to be going bald, against 40 strong young men isn't good odds, so why shouldn't he call upon the Lord for some help with his predicament?

As for the more general cases of "smiting the wicked," your "most superficial ethical level" is superficial indeed, as it only looks at the situation from a mortal perspective.  To understand these actions, we need to look at it from an eternal perspective.

The scriptures make it clear that we will be judged according to our works, and that salvation comes by the Atonement of Jesus Christ, whose power we can apply to ourselves through faith and repentance.  We have free will, to choose good or evil, for as long as that's a meaningful choice.  But when a person or a civilization reaches the point where they've sunk so low that there are no good choices to make, and no faith or desire to repent in their hearts, then there's no point in keeping them around any longer, especially if doing so would harm others.  (For example, by allowing them to live long enough to bring children into the world that would never end up having a chance to live righteously due to the environment they were raised in.)  At that point, God destroys them to prevent greater harm to the world.

It's an act of love, done by an all-knowing God who understands the consequences, which makes it fundamentally different from a murder committed by a sociopath who doesn't know (or most likely even care) what his victims might have done had they continued to live.