I’d suggest creating individual scripts that perform each of the actions, then using one of the Aqara blueprints (such as ZHA - Aqara Wireless Mini Switch ) to call the scripts in sequence.
For example, below is part of an automation I have using the Aqara button, with a blueprint I created for my variant of the device. It’s used to either turn off or shutdown a variety of devices with a single button press.