Hi, thank you!
I recently discovered that stcubeprogrammer for linux, I have to try to see if it works on raspberry and it could be the solution, it would be very nice to integrate the function in your interface.
Even recently on marlinkimbra a command (M9999) has been introduced to program the board without physically pressing the buttons on the board.