(Devarim 24:16) "Fathers shall not be put to death by cause of sons": What is Scripture coming to teach us? That fathers shall not be put to death because of (the sins of) the sons, and sons, because of (the sins of) the fathers? This is written (Ibid.) "Every man for his own sin shall be put to death." The intent is rather that fathers shall not be put to death by the testimony of sons, and sons, by the testimony of fathers.
Fathers Shall Not Be Put to Death for Their Sons
Sifrei Devarim 280:1