I have not come across the idea that the angel Mika'il keeps the devil out of heaven in mainstream Shi'i or Sunni texts.
Also, the Qur'an says that God Himself threw the Shaytan (the devil) out of heaven. This is not to say that an angel could not have been involved; however, the Qur'an does portray it as being directly between God and Shaytan. It also implies that Shaytan accepted being thrown out insofar as Shaytan swore to misguide human beings until the end of time (and this oath implies that he is not trying to return to heaven).
Of course, God knows best!
A summary of what the angel Mika'il does as per Islamic texts can be found here: https://www.al-islam.org/ask/topics/4478/questions-about-Angel