In the weeks after Donald Trump won the US presidential election, investors pumped more than $700 billion into Tesla Inc. shares, betting that Elon Musk’s relationship with the commander in chief and growing political prominence would pay off for the automaker. Barely four months later, that wager is shaping up to be one of the biggest duds of the equity market.