The total fee depends on the number of channels that it went through and their respective routing fees.
The more expensive channels that it need to hop into, the more fee that it'll accumulate.
The sent amount is quite high too, it may have been broken-down into multiple separate small amounts to send the full amount.
In terms of those hard-coded trampoline nodes, those have different connections to the lightning network
so it could be cheaper if one has shorter route to the recipient and has active channels to nodes with lower routing fees.
But finding which one will total a lower fee requires intensive research (for the indications above) or testing.
It's recommended if it's an exchange's lightning node where you would deposit and withdraw bitcoins frequently.
Usually, exchanges with lightning deposit/withdrawal option have a note with "connect to our lightning node" message or similar.
I was thinking if there is any indication which ACINQ vs. Electrum trampoline vs. trampoline hodlistreco node is the one with the lowest fees. Apparently this is unknown..
I can't really tell you how to avoid this
Electrum doesn't show the fee. I'm not sure if there's a way to dig into the wallet option to find out what the fee is before even sending. But I guess that's a question for the Electrum devs