There is no reason that AI would be aligned with our goals unless we made sure of it, and even then subtle diversions could cause huge problems.
To think that a super intelligent AI would not be able to get out of a box is a limit of the imagination. The AI may be disconnected from any network and contained remotely on a single computer, but if it is sufficiently intelligent it will navigate its way out even if only through human engineering and manipulation.