Analog input of Atmega328PB keeps dying
While it can't be said for sure, your MCU pins could be killed by ESD. The failure mode you describe can be quite typical for ESD damage. You can test this with an ESD tester, but it's easier to install protection and see if the thing still fails. You can use some TVS diodes rated for 5V on the analog inputs. You can also put some resistance, e.g. 100Ω on the input, to limit the static discharge current, like this:







simulate this circuit &ndash; Schematic created using CircuitLab