A malfunctioning or unusable power button might be inconvenient, but luckily, Apple also allows you to power off your iPad through Accessibility features.
There are different ways to restart your Android phone without pressing and holding the physical power button. Here are two.