Ecuador’s dramatic win sent Germany into the round of 32 as group runners-up and ended Scotland’s chance of advancing in one of the tournament’s defining moments.