hi i have encountered this problem before in a ford focus. that
time the car only 1 year old with low mileage and never get whack
type. i driving then the car stuck in 2nd gear did not want to
shift up. the rpm just kept going up as i accelerate. so no choice
did the same thing u did, stop by road side. i check the
transmission fluid is ok, all the other fluids are ok, but dunno
why after i start the engine and drive off again it was ok already.
Now the car is about 2 years old already never encountered that
problem again. I think it’s just an electronic glitch cos auto
gearbox controlled electronically so nothing to worry about unless
u get it very often then probably some chip in your transmission is
being naughty.