Thinking some more about how the development of this episode's script played out, it strikes me that these writers are really good at having their cake and eating it too.
Back when it was a half-hour story about Twilight being unjustifiably suspicious of Cadance and envious of her horning in on Shining Armor's attention, the resolution of the story (presumably) would have left us with a message about how you should give new family members a chance and don't immediately assume they're going to "steal" your brother from you, because they could turn out to be a wonderful addition to your family.
But then, when they added the changeling element to it, the story became one where Twilight's suspicions were totally justified. Everyone being too trusting of the new princess almost led to the downfall of Canterlot, and Twilight—the POV character—is the only one who saw through it. So although that makes for a neat action/adventure story, it would have ended up giving us a message of "Don't trust an interloper in your family as far as you can throw her, also everyone but you is stupid".

But
then, they brought back the
real Cadance and spent an appropriate amount of time establishing that she's a nice and likable pony who really does deserve Shining Armor, and she wins over Twilight during their escape from the caves. By the end, we're rooting for the real Cadance as much as we were against the fake one before she was revealed.
And the final message ends up being something like "Welp, when your brother ends up getting a new girlfriend, she might be a perfectly nice person that you'll love as much as he does, or she might turn out to be an evil succubus. Who knows? You gotta use your best judgment!"

So: nice save, writers.