Elon Musk spent more than $440 million on Republican candidates and causes, becoming the US midterm cycle’s largest single donor, but his preferred candidates lost races in Texas as the Democratic party swept to power. Shares in Tesla and SpaceX fell after the results.