In fact, the device can be fully controlled using only the touch screen, for this you need to enable Assistive Touch in the settings.
In new versions of iOS, you can turn off the iPhone simply through the menu “Settings” – “General” – “Turn off”.
Or for to enable Assistive Touch, go to “Settings” – “Accessibility”, scroll down and select “Assistive Touch”, put the switch in the on position.
After turning on, a translucent round button will appear on the iPhone screen, click on it, select “Device”, then press and hold “Screen lock” until the standard “Turn off” message appears on top of which we swipe left to right (this is called swipe right) and the iPhone will turn off.
You can turn on the device as I described in this article:
How to turn on the iPhone if the button does not work