..So close! When powering off now through AT command the board starts up again after half a minute or so.
Had this problem too, with a SIM808. Problem is that the power key of your board probably is a toggle, not a plain on or off. So if your board was on before your sketch starts it will switch off if you pull the power pin high, and switch it to low again, or if you keep it LOW.
The description of my board says that the RI (Ring Indicator) is high if the module is on, but it is always on, even with the module switched off. So, that signal is useless to sense the power status of the SIM module.
The SIM series have a pin "STATUS" that will tell the actual power status, but my board does not have it connected to a pin of the board, and I don't dare to solder an extra output.
My solution is to test at startup if the module reacts to a simple AT; command. If it does not there are two or even three possibilities: 1. it's OFF, 2. it's asleep if you enabled the slow clock and DTR is high. In that case the module sleeps, saves power, but does not have an active serial connection. To wake up a module in that state you need to pull DTR LOW to wake up the serial. 3. is a deeper sleep: AT+CFUN=0 switches off RF and SIM, so even less power is used.
If you did not enable slow clock mode, or switched the module to functionality=0 (to save even more power), and the module does not respond to an AT; command, you can assume the module is off. Do a power toggle using the PWR pin to switch ON the module. I use this:
I keep PWR HIGH normally, not LOW. If you keep it LOW the module automatically powers on, or off, as you experienced.
If you did enable slow clock (AT+CSCLK=1) pulling DTR to 1 will put the module to sleep, and switch off the serial connection. In that case to wake up you need to put DTR to 0 to wake up the serial connection before issuing the AT; command to test power status, else you may think the module is off, while it is only sleeping.
PS: you cannot power these GSM modules from an Arduino, they need a LiPo battery connected, else they probably don't start.