And the results are… no significant difference in speed between debug and release build and build in the Arduino IDE (all about 1M Dhrystones)
The sketch needed some tweaking to work - include Arduino.h and then add the USB/CDC definitions to platformio.ini