Optimize by ditching Electron and use Qt instead. You will gain ~50% performance increased and ~50% smaller app
From my initial tests with Qt, it isn't as convenient as Electron since I already have a fair amount of web dev experience, but maybe it will be worth it in the long run (and for the performance benefits).
You can also use .NET with Qt.
https://github.com/qmlnet/qmlnet
With this, you don't need to touch C++. It is still beta, but only because the API may change. It is very stable and has a large test suite.
However, this is an interesting question in and of itself, and I think it’s worth hearing out the answers. Could be some interesting techniques to pick up and reapply elsewhere.