This is getting really odd. The failures remain, only 3 shots are made instead of 5.
To rule out a camera setting causing trouble, try resetting the camera to defaults using the Canon menu.
Afterwards, please enable continuous shooting mode on the Canon interface (I don't know how to do it on your cam), and re-run the script. That will enable the script to do a test in continuous mode too. In case you have flash enabled, disable it. Also disable any sort of continuous AF or servo AF or face AF in the Canon menu.
Anyone else have an idea what could cause this?