I'm not a fan of Musk but you're getting his intentions wrong. He's not actively trying to undermine the EU. His recent support for AFD was actually meant, misguided or not, to support Germany.
And his support for Tommy Robinson in the UK was because he apparently believes freedom of speech in the UK is in danger.