It's interesting to me whenever developers say "actually this framework/language/library/platform that's popular and lauded for how accessible it makes development has great performance as long as you dig into the architecture and write code skillfully" because the broad consensus among users is that they will not.
As a user, comparitive "performance" is about the code people actually write, and even more on the code that I'm most likely to interact with. I don't actually care whether or not the code could be faster if it was written better, because it always could, and it never is. When people say "Electron is slow and bloated" they don't mean that exhaustively written Electron apps could never" be performant, they mean that apps that use Electron tend to be slow and bloated. The way to change that reputation is not to argue that Electron could* be fast if people held it right, but to make it easier and more natural for Electron apps to be faster than they currently are.
Actually, Electron is bloated, period. You can do your best with it, but there's a level of fundamental bloat and slow performance that's inherent to how it works. And bad code is bad code. Any platform can be used to write bad code, but the more accessible the development process is for newbie coders or non-coders, the more likely you are to get a lot of poorly performing apps, which is why there were a lot of those in Flash.
So I do understand why it got that reputation. But I'm using Javascript's raw performance in 2012 as an objective point of comparison. Consider a browser game. Given well-written JS coded with a competent understanding of the engine architecture versus well-written Flash, rendering the exact same animations, effects and interactions, you would find that the framerate in Flash could stay 25-30 fps on an iPhone 5, and be < 10 fps in Javascript. And that was with an alpha version of the Flash plugin. Similarly for JS bundled in Electron versus AS3 in the AIR engine as a "native" app. I know, because I wrote one of the first game engines for Javascript that attempted to do a subset of what could be done in Flash at the time.
What did make the dev process in Flash truly accessible was that it allowed the artists' pipeline to work in the same environment as the coders'. That did sometimes give rise to poorly written apps, but the fact is that the same thing in JS would have been even slower and more battery-draining, in an apples-to-apples comparison.