To start off, yes the previous prophets AS did indeed know of imam Mahdi AJ:
Abu Ja’far al-Baqir (as) had said: “Prophet Moses (as) looked up in the first Pentateuch what abilities and virtues would be given to al-Qa’im of Muhammad’s family and then he said: “O my Lord, make me al-Qa’im of Muhammad’s family!” It was said to him: “He is from Ahmad’s progeny.” He looked up in the second Pentateuch and he found the same things. He prayed Allah for the same thing and he was answered with the same answer. Then he opened the third Pentateuch and found the same thing. He asked his Lord for the same thing and the same was said to him.”
And at that time shall Michael stand up, the great prince which standeth for the children of thy people: and there shall be a time of trouble, such as never was since there was a nation even to that same time: and at that time thy people shall be delivered, every one that shall be found written in the book. (Daniel 12)
Note: the Arabic translation calls this Michael “al Qa’im”
And war broke out in heaven: Michael and his angels fought with the dragon; and the dragon and his angels fought, 8 but they [a]did not prevail, nor was a place found for [b]them in heaven any longer. 9 So the great dragon was cast out, that serpent of old, called the Devil and Satan, who deceives the whole world; he was cast to the earth, and his angels were cast out with him.
Here “angels” don’t mean actual angels since Christians say there are “fallen angels” (astaghfirullah) rather it means soldiers and an army since how come shaytan LA has “angels”.
If the dragon here is meant shaytan LA:
That the Mahdi, peace be upon him, kills Satan [1620 - (Imam Zain al-Abidin, peace be upon him) “The known time is the day of the rise of the Qaim, and if God rises him, he will be in the Kufa mosque, and Satan comes until he gets down on his knees and says: Oh, woe to him from this day, then he takes his forelock and strikes his neck, and that is The day of the known time is his is his last.”
If the dragon is meant by the Habtar & Zurayq:
25 But hold fast what you have till I come. 26 And he who overcomes, and keeps My works until the end, to him I will give power over the nations— 27 ‘He shall rule them with a rod of iron; They shall be dashed to pieces like the potter’s vessels’— as I also have received from My Father (Lord); 28 and I will give him the morning star. 29 “He who has an ear, let him hear what the Spirit says to the churches.” ’
prophet Isa AS claims imam Mahdi AJ will overcome his works.
the “morning star” may refer to him AS offering prayer behind imam Mahdi AJ
“the spirit” may refer to the prophet SAWA as we see in the gospel of John that the spirit is referred to as “parcalite” which means Ahmad (SAWA)
And the other references of the iron rod /scepter seem to be pointing at imam Mahdi AJ and Isaiah 11 also points to the rod but without the description of iron and talks about imam Mahdi AJ and Isaiah 11:10 calls imam Mahdi AJ “al Qa’im” in the Arabic translation.
Another example is psalms 45:6 and perhaps this chapter is talking about the marriage of imam al Askari AS and syeda Narjis SA since the description of it seems so fitting, but Allahu aalam