Full Idea
The idea of judgement at death and immortality on the basis of merit were developed in Egypt before 1000 BCE. It is not Jewish because it was not in the Torah, and the Sadducees, who stuck to their texts, seemed to have denied the afterlife completely.
Gist of Idea
Immortality based on judgement of merit was developed by the Egyptians (not the Jews)
Source
Paul Johnson (The History of the Jews [1987], Pt II)
Book Reference
Johnson,Paul: 'A History of the Jews' [Phoenix 1993], p.121
A Reaction
This is the idea considered crucial to religion by Immanuel Kant (Idea 1455), who should be declared an honorary Egyptian. To me the idea that only the good go to heaven sounds like sadly wishful thinking - a fictional consolation for an unhappy life.
Related Idea
Idea 1455 Belief in justice requires belief in a place for justice (heaven), a time (eternity), and a cause (God) [Kant, by PG]