The security issues with Flash are due to it being closed-source. Make it open-source and a lot of the problems that lead it to being EOLed will be solved.
Think about how Google pressured Microsoft to fix a vulnerability when MS was too slow to respond[1]. That's the kind of crap you see with proprietary development.
Open source is just a flat-out better method of developing software, but especially so when it comes to patching vulnerabilities.
[1] https://www.engadget.com/2015/01/02/google-posts-unpatched-m...