In case anyone else is looking for the real PowerOff (and NOT deep sleep or any other sleep method), the command to use is
M5.Axp.PowerOff();
(mind the capitals)
After this command you have to power your M5Stick manually by pressing the power button, but it works as a charm.
I tried. After lowering the baud rate to 115.200 it did work once. Could not debug any more and 6 others tries did not succeed after that. So uploading final software on production stick could perhaps be successful after numerous tries, but that's all. Not a consistent environment to develop prototypes or products.
For those who are interested, the code at the end of this tutorial works well. The tutorial is about strings, but works in exactly the same way for base64-encoded jpg images. All you have to do after decoding the string (containing the base64-encoded jpg image) is to write it to SPIFFS and then call M5.Lcd.drawJpgFile(SPIFFS, jpgFileName, 0, 0);
The library is now available on Platformio ("M5 Stack 4Relay Library") and Arduino IDE Library Manager.
Can I use your 4-Relay picture to add in my Readme.md file on Github ? And/or add this link: https://shop.m5stack.com/collections/m5-unit/products/4-relay-unit ?
If you want, you can add my Github link to your Arduino Example section.