Interesting observation. If all friendship is magic, and if all sufficiently advanced technology is magic, you suppose that, ergo, all sufficiently advanced technology is friendship. Considering that alternative, it sounds like a case of affirming the consequent. However, your alternative is evidently more meaningful, being as the original is practically equivalent to "friendship is magic." Yours, as I interpret it, makes sense, whereas the robotic twilight sparkle is technology that can, supposedly, emulate friendship so subtly as to be indistinguishable from friendship tout court, and magic, too, can be emulated. If I end up doing a series, I expect I will use your alternative. Thanks for the advice.
You managed to catch on to exactly my line of reasoning. I don't think there's any reason why you couldn't be friends with an AI of sufficient complexity.
I wonder if Equestria may hold such lost technology. Maybe Princess Luna created some kind of magically-powered robotic pony before she went Nightmare Moon. That could make for an interesting story. Too bad I don't have the skill to pull it off.