IIRC Prusa doesn't have the same issues with packpowering as Creality machines, but the reset on serial connection could be problematic if you are say printing from SD card and decide to connect OctoPrint while it's printing. That would reset the board and as a result kill your SD print.
Is there a way to send those commands via Octoprint? The semicolon seem to be filtered by the terminal windows (it may think it is the beginning of a comment).
Well you can create a text file for each command with the ending .gcode and then print it.
I guess when it is in a file there should be no filtering. @foosel ?