Erase iOS Device After Failed Passcode - Guide

Protecting Your iOS Device from Unauthorized Access
When an individual attempts to gain access to your iPhone or iPad through passcode guessing, the device initially imposes temporary lockout periods. These intervals lengthen with each unsuccessful attempt.
It is possible to configure your device to automatically erase all data after ten incorrect passcode entries.
A Common Security Concern
Consider a scenario where your iPhone is misplaced – perhaps left in a vehicle or lost in a public space. If discovered by someone with malicious intent, they might attempt to bypass the security measures by guessing the passcode.
Passcode Complexity and Brute-Force Attacks
With a six-digit passcode, there are a million potential combinations (106=1,000,000). While a computer could theoretically crack this passcode through a brute-force attack, iOS incorporates security features to prevent this.
These features include escalating time delays following failed attempts.
iOS Lockout Timers
Specifically, five incorrect attempts will lock your iPhone for one minute. Six attempts increase the lockout to five minutes.
Seven failed attempts result in a 15-minute lockout, and any further attempts will lock the device for a full hour.
Enhancing Passcode Security
These delays may deter opportunistic thieves, but the possibility of a lucky guess remains. Therefore, choosing a random and difficult-to-predict passcode is crucial.
Avoid easily guessable sequences like "1-1-1-1-1-1" or "1-2-3-4-5-6".
Automatic Data Erasure on iOS Devices
An alternative security measure exists: your iPhone or iPad can be configured to completely wipe its data after ten incorrect passcode attempts. Regular backups are strongly recommended if you activate this feature.
This setting is disabled by default. To activate it, navigate to the Settings application and select "Touch ID & Passcode".

Your passcode will be required to proceed to the subsequent settings.

Within the Touch ID & Passcode settings, scroll to the bottom and select "Erase Data" to enable the automatic data deletion function.

Frequent local backups via iTunes are advisable after enabling this feature. Without backups, data loss will be permanent upon device erasure. Consider utilizing a custom alphanumeric passcode to enhance security and reduce the risk of accidental lockout.

Before activating the data erasure option, it is prudent to firmly memorize your passcode. Alternatively, temporarily disable the feature whenever you modify your passcode.
Further Reading: How to Protect Your iOS Device with a Stronger, Alphanumeric Password
Ensure that your security measures do not inadvertently lock you out of your device. If you should forget your passcode, assistance is available.