HI sheakia83,
Thanks for reaching out to Apple Support Communities. It sounds like you have a question about keeping your iPhone secure. We're happy to provide some information to assist.
It's unlikely after the factory restore you would encounter any spyware unless you device was jailbroken or you downloaded any unauthorized software. You can view more information using the help of the article here: Unauthorized modification of iOS can cause security vulnerabilities, instability, shortened battery life, and other issues
However, all the steps you've taken so far would help and moving forward you can ensure your Apple ID account is safe with the steps here: Security and your Apple ID as well as the steps here: If you think your Apple ID has been compromised
You can also view possible weak passwords on website you visit with the help of the guide here: Change a weak password on iPhone
We'd also recommend checking out the steps in both article below to help you identify possible spam or phishing attempts and how to remove spam calendar event in the future:
Recognize and avoid phishing messages, phony support calls, and other scams
Identify legitimate emails from the App Store or iTunes Store
Delete spam calendars and events on iPhone
Hope the information helps!
Take care.