Well if this is what you are worried about, then you can wake your device using your fingerprint without pressing any buttons.
If you want also to turn off your screen without pressing any hard button, then I guess you can use the app that I created for my Samsung Galaxy Note 8, which turns off...