For background, I will quote myself (forums.catholic.com/showthread.php?t=804289):
The Emperor Constantine signed the Edict of Milan in 313 AD, which ended persecution in the Roman Empire. Constantine himself became a Christian, and suddenly it was very fashionable (and perhaps profitable) to be a Christian (whereas, before, it would get you killed). The Church was confronted with an unprecedented wave of conversions, and possibly with the problem of some people misrepresenting themselves as Christian priests and Bishops. Credentials were difficult to verify back in those days.
The problem was not really so much about a few illicit “bishops,” but what would happen if those “bishops” “ordained” other men as “bishops” (who were not aware of the illicit nature of their “consecrators”). Suddenly, the whole Apostolic foundation of Catholic Orders could be called into question.
The Church needed a solution to this problem - some way to guarantee that Episcopal Ordinations were valid, even if the validity of the consecrators could not be assured. The Church turned to mathematics.
Twelve years after the Edict of Milan, the Church convened the very first full Ecumenical Council, the great Council of Nicea. This topic was on the agenda.
Only one Bishop is needed to validly ordain another Bishop. But the very first Ecumenical Council, Nicea, imposed a rule (Canon 4) which remains in place to this day - a licit Episcopal Ordination requires at least three Consecrators. As long as just one is valid, the Ordination is valid (FWIW, it is customary for an Episcopal Ordination to be celebrated by many Bishops (ten or more), simply because they want to be present).
Suppose that there were invalid bishops running around in 325 AD (we don’t know that there actually were - there are no records of spurious bishops - but it could have happened). Suppose we accept the ridiculous idea that as many as 1 in 20 bishops was invalid. What is the probability of selecting three invalid bishops? It’s 20 x 20 x 20 (assuming there are at least 22 invalid bishops). That is a probability of 1 in 8000. The first generation of Bishops had 1 in 20 invalid bishops, but the second generation has only 1 in 8000 invalid bishops.
The probability of selecting three invalid bishops from such a pool is 8000 x 8000 x 8000, which is 1 in 512,000,000,000 (that’s 512 billion). As you see, the line of succession actually purifies itself over time. There have been hundreds of generations of Bishops, meaning the probability of having even one invalidly ordained bishop is staggeringly improbable. It’s what physicists call a “small but nonzero probability.” That is about the same probability that all of the air will disappear from your living room (it could happen, but it is staggeringly unlikely).
The math wins, every time. The only way the math could not win is if 2/3 + 1 of all bishops were invalid at any point in time, and Episcopal ordinations never had more than three consecrators (whereas it is common to have many more). For this extreme situation to occur in the twelve-year window of opportunity between the Edict of Milan and Nicea-1 is patently absurd.
It is therefore unnecessary that we know (and can prove) any Bishops episcopal lineage. We don’t need knowledge of history, or even the guidance of the Holy Spirit, to know that every Bishop has valid Apostolic succession. We know this by simple math.
You ask about “invalid” Episcopal Ordinations. I say that such a thing is not remotely possible.