seems like the same idea except for the heart part.
the questioning as mentioned in Quran mainly starts with Angels asking "what is your Religion, who is your Prophet, and who is your God" thats universal to all humans, however, as simple as these questions are, only true believers will be able to speak at all and answer them comfortably.
then you will be shown a full "report" of every single sin/deed you've ever made and asked why, how, what're your thoughts about them, and whether or not you regret any of them. (even though Allah already knows, but he wants you to verbally confess)
speaking of Ancient Egypt, they had real beef with Allah (way before Islam was officially announced)
so there was this tyrant dictator Pharaoh who couldnt get over how he was the only God and ordered his people to worship him and he would enslave whoever refused to.
so Allah kept sending him messages
indirectly via the prophet Moses
** to advise him to correct his mistakes and stop and stuff, but he never listened and kept doing hardcore shit and sometimes harm that messenger each time.
so after a few back and forth interactions Moses managed to make some of the Pharaoh's followers believe in Allah.
but the Pharaoh never stopped so Allah ordered Moses to take those who believed to a sea, the Pharaoh and his army followed them, thats when Allah decided to punish Pharaoh by
splitting the sea in half so that Pharaoh and his followers drown.
** you might be confused because I might have said that Allah communicated with no one but Muhammad, well not really, he communicated with all the other prophets, but only his communication with Muhammad was the start of Islam/Quran.