Password controlled iphone erase application?
Currently there is no feature for this in iOS. For an improvement over the erase after 10 incorrect passcodes, you can use Apple Configurator to set this to a number between 2 and 10.

                                

I haven't been able to find a way to do this with jailbreaking either, since there doesn't seem to be any actions or such to use the Erase Content and Settings option, however you could set up an Activator action to run a variety of ‘rm’ commands such as rm -rf /private/var/mobile which may be suitable depending on what you are going for.