Attached is a macro that turns off the phone at 11pm on a Saturday.
This works on a Galaxy S23
I expect it should work on the S22+.
However, you will need to configure the Power off screen to show the 3 options in a column.
The final UI click x,y values will probably need to be adjusted for the S22+ screen (bigger screen). The confirmation icon is roughly in the centre of the screen on the S23.