I'm getting disconnected from the IDE quite often. I think it happens when the CPU gets overloaded: is that plausible?
yes: high CPU usage will make the IDE less responsive, potentially disconnecting you. When this is the case, just press the button on the Bela cape and it will stop the running program, so the IDE should become available again.
What if the button is out of reach due to the Bela being inside an instrument enclosure?
You can remote it: it's "P9.27" (Bela) or "P2.34" (BelaMini). Short it to ground briefly to stop the currently running program. If you hold it for 2 seconds or more, you will get the action associated with it (default: graceful shutdown of the board, can be overridden by creating an executable file in /opt/Bela/local/bela_button_hold.sh to be called upon press hold). You can also change the behaviour of the button (or even the GPIO pin in use) by editing /lib/systemd/system/bela_button.service.
Thanks, that's very helpful