All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The Hadeeth which you referred to in the question was reported by Muslim and others, and most scholars are of the view that it is obligatory to make up the missed prayer immediately. The Prophet delayed praying the Fajr prayer until he came out of that valley in order to move away from the place of negligence in which the devil was present.
Shaykh Ibn 'Uthaymeen said after he quoted the evidence that it is obligatory to make up a missed prayer immediately:
“If one asks: ‘Did the Prophet not order them (the companions) to move from their place to another place?’ The answer is: ‘Yes’. But he explained that by saying: “It is a place where the devil was present.” So, one should not pray in a place in which devils are present. For the same reason, he forbade one from praying in the toilet because it is the dwelling of the devils.” [End of quote]
With regard to those who oversleep and do not get up for the Fajr prayer, for example, then it is desirable for them to make it up in congregation but they are not obliged to do so.
An-Nawawi said in his book Al-Majmoo’:
“In regard to making up the obligatory prayers, the congregation is neither an individual obligation nor a communal obligation; there is no difference of opinion about this among the scholars. However, the congregation is desirable when both the Imam and the worshippers have missed the congregational prayer, such as Thuhr or ‘Asr.
The evidence about this is the authentic narrations informing that when the Prophet and his companions missed the Fajr prayer, he prayed it with them in congregation.” [End of quote]
Allah knows best.