It's extremely rare for ECUs to fail these days, the manufacturing methods and quality control are such that build faults don't get through and in-use failure is almost unknown. Having said that, anything is possible.
As I've said before, by far the most common and likely problem is with connectors. When they swapped the ECU I wonder if they swapped it back for the "faulty" original one to check the problem returned, and preferably swapped the "faulty" one onto the donor bike for the "good" ECU? Does the fault move with the "faulty" ECU? Quite often simply disconnecting the plug/so