Well done!
You fixed one of the devices!
Before you throw away the ATMega from device #2, do you think you can reprogram it if you stick it into device #3? I mean that there might be something wrong with the other parts e.g. capasitors, resistors, zener diodes of the device#2.
So If I were you I would try ATMega#2 in the device#3 which you know is working.

Good luck!