I admit I was once in Athens with a ferry back to Italy to catch, and it was 5:00 and although there plenty of cabs NONE would pick me up. Finally I flashed a fan of cash at one and he stopped - and I did make my ship.
It is really hard to say what you would do in a similar situation. I dare say most people would NOT rob you.
I was once stuck at a remote beach in St Martin with no taxis in sight, Fortunately, a couple of Americans who had rented a car were at the same beach and they gave us a ride to where we could get a taxi. Otherwise, I think we would have been stuck - and I was a crewmember at that time.