Hello Thomas
STM32CubeMonitor do not have feature to flash the MCU with the elf file. The elf is only used to find the symbol list and addresses.
There should be some options to do the flashing.
First, there is an "exec" node in node-RED to launch some commands. So you should be able to launch STM32CubeProgrammer CLI from a flow. For the access pre-emption, when the acquisition is not running, STM32CubeMonitor is not locking the probe. So you can make a sequence where acquisition is stopped, flashing is started (and programmer takes the control), and acquisition is restarted after some time. The probe will reported as disconnected by cubeMonitor during the flashing, but cubeMonitor will reconnect when flashing will be done. (after some seconds, the timeout is configured in setting file).
An other option could be to user ST-Link "shared mode" or "tcp" in cube monitor. In this case CubeProgrammer and CubeMonitor can have shared access to the probe. It may be slower. I have tested STM32cubeIDE and STM32cubeMonitor in shared mode, and it is fine, the IDe is able to flash or download while CubeMonitor is connected.
If you want to perform a complex test sequence, you can check the node "node-red-contrib-finite-statemachine" which is helpful to write a sequence.
Best regards
Stephane