A Nice thought. perhaps, one can advance in designing one. The baby, already under trauma and semi conscious, would be scared by this creature, as he/she would not have seen one such earlier.
It becomes really tough to educate the baby while under tension , underground.....
the robot should be stuffed with lot of sponge , so that while handling the baby, it would not cause damage to the baby. the way it grips the bay , either by hands, or by waist, should be gentle and firm with no damage and proper grip to prevent slippage. perhaps the best is the baby is held below the robot by a rope given to babies hands to hold-- if the baby has energy enough, at that time of trial. Otherwise a gentle tie up around waist or below the elbows appears a possibility.
however, while pulling her up, the possibility of hands and head damage id of utmost importance. A medico's firm approval might be need of the hour.
all the best.
More important would be the people of concerned area, to be vigilant and can arrange a heavy grill or effective fencing around the area of bore well being dug even at their cost. This is all they beneficial.
Children's attitude cant be taken for granted , with their enthusiasm forcing to go and explore the site.