There is definitely something else wrong.
Even if the shower was a 10.5kW model, which would be in the region of 44 or 45 amps, that's still not enough to trip a 40A circuit breaker ever.
To trip a 40A on overload, it would need around 58 amps, and even then it would still require the shower to be switched on continuously for tens of minutes, certainly not immediately.
To trip immediately requires far more current, which would be caused by a fault between L&N or L&E - however a fault between L&E would trip the RCD, so that just leaves a fault between L&N which for some reason is intermittent. That's very likely to be inside the switch, somewhat less likely is a damaged cable or the connections inside the shower itself. All of those need to be checked.
If the switch has overheated before, the cables connected to it will also have overheated causing the copper to soften, and connecting any new switch to that will inevitably result in a loose connection. The cable must be cut back for a decent distance before connecting to a new switch.