Reset to factory shipment state after malware infection

Is there a possibility that if an iPhone is infected with malware, and I notice it and reset it to the factory shipment state, and then download and restore apps and data through iCloud, the malware will also be restored, leading to a situation where information can be compromised again?

Is persistence possible? Sure. Is persistence likely? No.

Persistence is a very expensive exploit, per published exploit pricing.

Existing malware has tended to re-infect, and not persist, per available reports.

Most of the reported security shenanigans involve passcode and password compromises, and down-revision devices and down-revision iOS, and similar. Usually not iOS or app compromises.

If you are a target of a very well-funded entity and one with access to the exploit tooling you're concerned about here, you'll want to acquire tailored help for your particular situation, risks, and security requirements.

For what Apple suggests doing: https://support.apple.com/guide/personal-safety/welcome/web (There's a PDF at the bottom of that webpage.)

Reset to factory shipment state after malware infection
 
 
Q