Considering that we have lots of geniuses (e.g. Godel, Nash) that were far from the ultimate social manipulators, I think it will most likely be an awkward "Rain Man" style intelligence -- as it has all the "brain" (cpu) circuitry, and none of the social opportunities and inputs that people have.
It's not only magic that people have issues learning. It's all kind of skills that do not fit their idiosyncrasy.
It's not that an introvert can't read about how to act like an extrovert, for example. It's that they can't pull it off in practice, because it goes against their instincts (of course talking about the general case).
The same way a shy person can read about the actual best ways to approach a romantic interest, but not be able to convey it realistically enough.
Why would this be a problem for an AI? Well, if we imagine a powerful thinking AI, I'd also attribute it with having emotions, subconscious (e.g. hidden weights in its neural network brain, etc), so this would also apply to it -- can't see why it would have to be a total "sociopath" (which for humans comes from some kind of genetic or environmental accident).
Besides, while you can "contemplate about every sentence and somehow compress that into 1 second", actual "trial and error" with humans cannot be compressed.
Also don't underestimate the psychology of guards: You'll always find people who are either very principled (yes, they do exist) or get a kick out of controlling (imprisoning in this case) someone/something, especially someone/something of a high intelligence.
Throw in a hierarchy with a controlling officer and two subordinates who were also trained to watch the officer and I think it's pretty secure.
If only we could select our politicians in the same way.
I imagine that the machine architecture is layered. This means, the machine is not aware of its own power control. It's similar like us humans not aware of digestion.
By the time AI becomes a threat intelligence-wise, it'll be in a position to unplug us.
It can reboot after a power failure, we can't.
As in information security, the weakest point is the human in the chain, not the technology.
The fact that it's some code running in a box. No need to give it text-to-speech capabilities, or let guards have access to its console.