Yes, it can be done. Please navigate to iOS–>Passcode. You will be able to configure the passcode rule for the iOS device. There will be multiple fields to fill. At the bottom will be the option to set the number of failed attempts after which the device is to be wiped. When the wrong password is entered for a specified number of times, the device will get wiped automatically.
Kindly use the help link for password policy on iOS.