Rayan.
AFP saw the machines working under floodlights throughout the night into Friday, to clear the area around the 32-metre (35-yard) deep well in the village near Bab Berred.
But the shaft, just 45 centimetres (18 inches) across, was too narrow for rescuers to reach the bottom.
On Thursday rescuers were able to send him oxygen and water via pipes, the MAP news agency said.
But since then authorities have not disclosed any more information on his condition.
On Friday, rescuers said they had dug down 28 meters and were preparing for a delicate operation to create a horizontal shaft to reach the boy.
Mother of the boy waits as authorities and firefighters work to get five-year-old Rayan out of a well. AFP
But they said there is a risk of a landslide. The operation is complex because of the nature of the soil, some of which is sandy while other parts are rocky.
"The child's rescue is approaching," government spokesman Mustapha Baitas said.
"Our hearts are with the family, and we are praying that he will back with them as soon as possible."
Rescuers work to get Rayan out of a well into which he fell on Tuesday. AFP
The boy's mother told Moroccan media that Rayan had been playing nearby when he disappeared Tuesday afternoon.
"The whole family went out to look for him then we realised that he'd fallen down the well," she said with tears in her eyes.
"I'm still keeping up hope that we'll get him out alive."
The MAP news agency said medics were on site to check on the boy once he is extracted.
Authorities have also a helicopter on standby to take the child to hospital once he is extracted, national news channel 2M said.
The drama has sparked an outpouring of sympathy online, with the Arabic hashtag #SaveRayan going viral across the North African region, including in neighbouring Algeria.
Moroccan footballer and PSG star Achraf Hakimi mentioned the rescue efforts on social media, alongside emojis of a broken heart and hands together in prayer.
Bystanders watch as authorities work to get Rayan out of a well. AFP
Manchester City's Algerian star Riyad Mahrez also joined the chorus of solidarity, sharing a picture of Rayan on Facebook alongside the hashtag "Stay Strong".
The boy's fate has also attracted crowds of people to the site of the operation, putting pressure on rescuers operating in "difficult conditions", Baitas said.
"We call on citizens to let the rescuers do their job and save this child," he said.
The accident echoes a tragedy that occurred in Spain in early 2019 when a two-year-old child died after falling into an abandoned well 25 centimetres wide and more than 70 metres deep.
Julen Rosello's body was recovered after a search and rescue operation that lasted 13 days.