NAGOYA - Toyota Motor Corp. is preparing to build a new factory to manufacture electric vehicles in Shanghai, with operations expected to begin around 2027, people familiar with the plan said Monday.