washing the deceased in this hadith is simply cleansing, because the prescribed ritual act of purification is limited to three times and is not left to a person’s discretion, whereas in this hadith the Prophet ﷺ left the matter to their judgment.
It may be said: He left the matter to their judgment only with regard to increasing the number of washings, not with regard to the basic obligation of washing. Yet the first evidence is sufficient in this regard. Indeed, washing the deceased is a matter known by necessity and so widely established as to be nearly mass-transmitted.
This applies whether the person died suddenly, in an accident, or from an illness, and whether young or old.
Does this include a miscarried fetus?
There is some detail: if the soul has been breathed into it, it is washed, shrouded, and the funeral prayer is offered over it. If the soul has not been breathed into it, then this is not done.
The soul is breathed into it once it has completed four months, due to the hadith of Abdullah ibn Masud, who said: The Messenger of Allah ﷺ, the truthful one whose truthfulness was affirmed, told us: “Each of you is brought together in his mother’s womb for forty days as a drop of fluid; then he becomes a clinging clot for a similar period; then he becomes a morsel of flesh for a similar period. Then the angel is sent to him and commanded to write four matters: his provision, his lifespan, his deeds, and whether he will be wretched or blessed. Then the soul is breathed into him.” (1) The Prophet ﷺ could not have known this without revelation, since there is no room for independent reasoning in such matters.