An activist firm representing Tesla Inc. shareholders has excoriated the electric-car maker, claiming that it’s veered off the path to profit and urging a major overhaul of the Elon Musk-led board.