Since the programs in the ECU are stored in non-volatile flash memory, I don’t think a re flash would help. If there was an issue, the ECM would usually throw a code that says something like ECU error.
P0420 is a catalyst efficiency code. Given the vehicle sat for a couple of years, I would tale a look at the upstream and downstream O2 sensors and do the other P0420 diagnostics. See this ETCG link: https://www.youtube.com/watch?v=9VZ5K8n5jj0