Jim Farley took over Ford Motor Co. more than two years ago, eager to chart the auto maker’s path to an electric, high-tech future. Lately, though, problems from the past are requiring his attention.