Is it possible to force the iPhone to shutdown (programmatically, of course)?
Not on an unjailbroken phone, no.