If I buy bitcoins from a legitimate exchange and put them in the Electrum wallet is that wallet now forever linked to me by this transaction?
The address will be linked to your exchange account. Bitcoin transactions are stored forever in the blockchain.
If I send bitcoins from this Electrum wallet to a mixer then back to a second Electrum wallet owned by me is this second wallet/coins now completely anonymous?
Yes. If you never do any direct transaction from your wallet 1 to the wallet 2 and if the mixer trully works (some can be analysed quite easily).
Buy Bitcoins -> Send to Wallet 1 -> Send to Mixer -> Wallet 2.
If you use ChipMixer (see my signature), it's will probably be more effective, because the output coins are older than the input (the coins you sent), so chain analysis are way more difficult to be executed.