First let me comment that the dying instant is not really an instant of time, it MAY be felt as a very long period of time by the person being dying, but not always as it depends on the person being dying. In this period of time many things may happen among them being punishments (not talking about after death, but death itself). Then we have some pre-death and after-death happenings that Satan coming to people belong to the pre-death list of happenings. This answer to your question cannot be very short unless we only address some points that may encourage you for more research on the issue:
About some wrongdoers (not for everyone) at their death:
وَلَوْ تَرَىٰ إِذْ يَتَوَفَّى الَّذِينَ كَفَرُوا ۙ الْمَلَائِكَةُ
يَضْرِبُونَ وُجُوهَهُمْ وَأَدْبَارَهُمْ وَذُوقُوا عَذَابَ الْحَرِيقِ
If thou couldst see, when the angels take the souls of the Unbelievers
(at death), (How) they smite their faces and their backs, (saying):
"Taste the penalty of the blazing Fire-[Al-Anfal, 50]
فَكَيْفَ إِذَا تَوَفَّتْهُمُ الْمَلَائِكَةُ يَضْرِبُونَ وُجُوهَهُمْ
وَأَدْبَارَهُمْ ﴿٢٧﴾ ذَٰلِكَ بِأَنَّهُمُ اتَّبَعُوا مَا أَسْخَطَ
اللَّـهَ وَكَرِهُوا رِضْوَانَهُ فَأَحْبَطَ أَعْمَالَهُمْ
But how (will it be) when the angels take their souls at death, and
smite their faces and their backs? / This because they followed that
which called forth the Wrath of Allah, and they hated Allah's good
pleasure; so He made their deeds of no effect. [Muhammad, 27,28]
So you see there is not necessarily one angel of death. Particularly the holiness Izra`eel will receive the soul of the prophets and some highest believers and his army will do the job for the others. Also see the verse that says anyone who commits and/or is pleased with others committing bisexual sins will die on the torture of the tribe of Lut, peace be upon him:
فَلَمَّا جَاءَ أَمْرُنَا جَعَلْنَا عَالِيَهَا سَافِلَهَا وَأَمْطَرْنَا عَلَيْهَا حِجَارَةً مِّن سِجِّيلٍ مَّنضُودٍ / مُّسَوَّمَةً عِندَ رَبِّكَ ۖ وَمَا هِيَ مِنَ الظَّالِمِينَ بِبَعِيدٍ
When Our Decree issued, We turned (the cities) upside down, and rained down on them brimstones hard as baked clay, spread, layer on layer,- / Marked as from thy Lord: Nor are they ever far from those who do wrong! [Hud, 82,83]
According to a Hadeeth from imam Sadiq peace be upon him, this torture will come to them at their death so others will not understand this.
A short narration from Allah is in Surah Al-Waqi`ah
فَلَوْلَا إِذَا بَلَغَتِ الْحُلْقُومَ ﴿٨٣﴾ وَأَنتُمْ حِينَئِذٍ
تَنظُرُونَ ﴿٨٤﴾ وَنَحْنُ أَقْرَبُ إِلَيْهِ مِنكُمْ وَلَـٰكِن لَّا
تُبْصِرُونَ ﴿٨٥﴾ فَلَوْلَا إِن كُنتُمْ غَيْرَ مَدِينِينَ ﴿٨٦﴾
تَرْجِعُونَهَا إِن كُنتُمْ صَادِقِينَ ﴿٨٧﴾ فَأَمَّا إِن كَانَ مِنَ
الْمُقَرَّبِينَ ﴿٨٨﴾ فَرَوْحٌ وَرَيْحَانٌ وَجَنَّتُ نَعِيمٍ ﴿٨٩﴾
وَأَمَّا إِن كَانَ مِنْ أَصْحَابِ الْيَمِينِ ﴿٩٠﴾ فَسَلَامٌ لَّكَ مِنْ
أَصْحَابِ الْيَمِينِ ﴿٩١﴾ وَأَمَّا إِن كَانَ مِنَ الْمُكَذِّبِينَ
الضَّالِّينَ ﴿٩٢﴾ فَنُزُلٌ مِّنْ حَمِيمٍ ﴿٩٣﴾ وَتَصْلِيَةُ جَحِيمٍ
Then why do ye not (intervene) when (the soul of the dying man)
reaches the throat,- (83) And ye the while (sit) looking on,- (84) But
We are nearer to him than ye, and yet see not,- (85) Then why do ye
not,- If you are exempt from (future) account,- (86) Call back the
soul, if ye are true (in the claim of independence)? (87) Thus, then,
if he be of those Nearest to Allah, (88) (There is for him) Rest and
Satisfaction, and a Garden of Delights. (89) And if he be of the
Companions of the Right Hand, (90) (For him is the salutation), "Peace
be unto thee", from the Companions of the Right Hand. (91) And if he
be of those who treat (Truth) as Falsehood, who go wrong, (92) For him
is Entertainment with Boiling Water. (93) And burning in Hell-Fire.
which explicitly says about the life reaching the throat of the person while dying. To understand this you may need some pre explanations. In quran e.g. we have heart and chest, and even we are told the heart that is placed in the chest, but yet concepts other than simply the limbs of our body are intended. The names are similar because they are not intrinsically different, but not exactly the same as well. Studing about this and how Allah will conduct the Rise for the judgment day you will understand why throat is probably a final place for having soul, and for that you will always require some understanding about the connection between soul and body, also the brain and body. This much may suffice for here.
About Satan coming the person almost dying is a fact that we are warned of it, so there is a famous Dua that we are told to read so that we will remain safe of his greatest trick at those difficult times.
Note that Death is anyway one of the 3 difficult instant of life of any human, and it is clear from Ahadeeth explaining why Jesus peace be upon him said while was in his cradle:
وَالسَّلَامُ عَلَيَّ يَوْمَ وُلِدتُّ وَيَوْمَ أَمُوتُ وَيَوْمَ
أُبْعَثُ حَيًّا
"So peace is on me the day I was born, the day that I die, and the day
that I shall be raised up to life (again)"! [Maryam, 33]
Also it is true that people can see many things from the after death world, which is nothing but a deeper truth of Dunya, like Pharaoh saw the holiness Jibr`aeel while he was still alive:
وَجَاوَزْنَا بِبَنِي إِسْرَائِيلَ الْبَحْرَ فَأَتْبَعَهُمْ فِرْعَوْنُ
وَجُنُودُهُ بَغْيًا وَعَدْوًا ۖ حَتَّىٰ إِذَا أَدْرَكَهُ الْغَرَقُ
قَالَ آمَنتُ أَنَّهُ لَا إِلَـٰهَ إِلَّا الَّذِي آمَنَتْ بِهِ بَنُو
إِسْرَائِيلَ وَأَنَا مِنَ الْمُسْلِمِينَ ﴿٩٠﴾ آلْآنَ وَقَدْ عَصَيْتَ
قَبْلُ وَكُنتَ مِنَ الْمُفْسِدِينَ
We took the Children of Israel across the sea: Pharaoh and his hosts
followed them in insolence and spite. At length, when overwhelmed with
the flood, he said: "I believe that there is no god except Him Whom
the Children of Israel believe in: I am of those who submit (to Allah
in Islam)." (90) (It was said to him): "Ah now!- But a little while
before, wast thou in rebellion!- and thou didst mischief (and
violence)! [Yunus, 90,91]
Note that repent is accepted before the soul is completely extracted from the body but this is not for those who are receiving torture of Allah, so pharaoh's repent was not accepted and it has some other evidences in Quran.
Finally, according to Shia Ahadeeth no one, Muslim or non-Muslim, will die unless he will see the holy prophet and his brother Imam Ali peace be upon them next to him/her. But this need further explanations, specially for those living before the time of the holy prophet and Imam Ali peace be upon him.
Anyway, this is not a very simple issue, you will need to research a lot, and you will need to learn a lot of perhaps new concepts that can make some Ahadeeth meaningful.