Genesis 9.29 seems to indicate that Canaan along with his line were cursed and so not among the elect (some believe that Noah's curse on Canaan is emphasizing that Ham's sin by showing it would affect not just him but his descendants, with Canaan singled out because he was the youngest of Ham's sons, and Noah’s curse could be seen as targeting the descendants of the one who "sinned" even while Ham himself wasn't directly cursed in the text). If this is the case, then it fits with the idea that the 8, who were the visible Church at time, were not all part of the Church invisible. Ham seems to be a type of Judas, a tare in the wheat, or one of whom John (1 John 2:19) and Paul speak of (Titus 1:16).
All of this is hard to decipher, starting with the initial text supplied.
Do you mean Gen.9:25, "Cursed be Canaan..."? Anyway, Canaan wasn't on the ark, not one of the eight counted.
Did you mean to write, "
Ham along with his line were cursed and so not among the elect"? Because someone's genealogical line follows them.
Do you think Ham was cursed? Why isn't he named? Why is the word
sinned put in quotation marks?
What was Ham's sin? Where is it in the text?
Obviously, a hypothetical (...if this is the case...) can lead one to a rational conclusion. But the premises must be sound, and the conclusion should be necessary (modus ponens).
The passage Gen.9:20-25 is subject to quite a bit of speculative interpretation. Much leans on supposition that isn't actually present in the text, or context. And a text like 1Pet.3:20, which is quite plain and unambiguous, suffers on account.
Gen.9:18 gives a brief, truncated genealogy of Noah: his three sons, and one grandson, Canaan, are named. In the Bible, a man's descendants are often labeled as his sons. Jesus, son of David, is perhaps the most obvious example. In terms of Gen.9, the youngest son of Noah who has been named in the text so far is without a doubt Canaan.
Canaan is cursed. The text tells us that the curse results from whatever it is Noah's youngest son did to him. The Hebrew comparative adjective, younger, is capable also of the superlative sense. In the lists of the three brother's names, Ham is never last. He is always the middle name. Gen.10:21 uses another comparative adjective, elder, to refer to Shem over Japheth (whose was the first genealogy listed). The logical reason for the note is that Shem's genealogy is reserved to the last of the three brothers, in spite of the fact he was the eldest--because the narrative will continue forward with his story, leaving the other sons and nations aside. The note attests that the brothers' birth order, for the sake of narrative progress, is reversed (Japheth, Ham, Shem) just for these Gen.10 genealogies.
Ham is not the youngest son: not the youngest person named, not the youngest son of Noah. Ham's action in v22 may or may not be blameworthy; the text is silent and open to interpretation. His brothers' action in v23 appears to be both cautious, and later commended in vv26-27, although this too is a matter of connecting the dots. Canaan, however, is clearly guilty of something according to Noah; and he is cursed for it. These words foreshadow the Canaanite evil (far in the future) for which God will destroy them out of the land they once claimed, as he gives it to the descendants of Abraham, through Isaac and Jacob.
On very scant evidence and dubious interpretation thereof, Ham is made a scapegoat. He is turned into a Judas. His association with salvation, to the point of explicit reference, is treated as unclear. He is regarded as having been "indirectly" cursed of his father. Worst of all, a "curse of Ham" was once used as religious justification for racism. Yet, Canaan was cursed. And that curse was fulfilled as far as it would ever be in biblical terms when Israel conquered their Promised Land.
Several speculations have been put forward as to the sin for which Canaan was cursed. My thoughts have, I think been published here in some other thread. But in fact, the text leaves that fact unstated, only implied. Whatever it was, foisting it on Ham is unsupportable.