Assuming your device is jailbreakable, the problem is that your phone is vulnerable to jailbreaking, whether you've decided to jailbreak it or not. In the relevant scenario (the one described in the article, with "a few minutes alone with the smartphone of the person being stalked" and the passcode), if the victim hasn't already chosen to jailbreak the phone, the stalker can easily jailbreak it and install the spyware.