No, rebooting your iPhone won't make your device safe again. In the best-case scenario, it will delay the hackers a few seconds before they return to business. A complete restoration of factory settings is different, as it can eliminate the hacks. But you will also lose any of your data, and if you restore security back up, you'd be installing the same vulnerabilities again. So a factory reset only works if you start as a user from scratch.