Where does an iPhone store the number of failed password entries?
The number of failed passcode entries is stored within the Secure Enclave in the hardware. It is not stored as a file or anything like that on the Flash drive.
You cannot easily manipulate it.