Tesla plans to replace Model S and Model X production lines at its Fremont factory with a facility capable of producing 1 million Optimus humanoid robots annually.