How to wipe a 4s with a lockscreen and an unresponsive touchscreen

I am trying to factory reset an iphone 4s that has a cracked lockscreen that only allows me to press 2 or 3 of the numbers on the lock screen. I am unable to power off the device other than letting it die and using recovery mode in itunes fails at the end because of the passcode lock. Any ideas?
Get the screen replaced?

Original thread: https://forums.imore.com/threads/how-to-wipe-a-4s-with-a-lockscreen-and-an-unresponsive-touchscreen.272904/