I think you need to create an AI that doesn't want to wipe out humanity. Anything done at a software level can be programmed out by the AI. Hardware level restrictions would work on a short term basis but once AIs start designing themselves and new chips then you lose the hardware restrictions you previously relied on. Even with the best people reviewing the designs they are likely to soon get too complex for a lone human or even a group of humans to understand.
So we need to look at why we think an AI would want to subjugate or destroy humanity and make sure we don't give it reason to do so.