My Fiesta did that exact same thing last year,
tuck me ages to find it.
Turned out to be the speed sensor coming of the speedo cable at the box.
The plug were i joins the main loom was dodgy.
fixed connection and was perfect then
Dono if EFi Escorts have the same set up, but worth a try