Making sure only one of electric shower or instantaneous hot water heater can operate at once
Why do you need two?

In Europe, some showers have their own, on-board, built-in on-demand water heater just for the shower. This is called an "electric shower".  

Which begs the question of why you need two on-demand water heaters, since you are already installing one for the whole house.  Simply using the one would solve the power problem.  

Or, if your issue is that the shower and kitchen are distant from each other, and you don't want the long delay, then OK, we have to hunker down and have two heaters, and must solve the electrical problem.  But then, again, why a heater dedicated to the shower?  Why not a whole-bathroom heater so you can serve the sink also?

A relay would need to be current-activated

There's an easy electronics approach with a gadget called a reed relay, which placed next to a high current wire will engage.  It needs 10 ampere-turns to operate, typically, and you'd have ~40A going through that wire, so merely orienting the reed relay correctly should get the job done. Essentially, drawing current on the shower heater would throw the relay and knock out the other heater (I presume you'd want it that way).  

However, the challenge here is doing this with mains-rated equipment acceptable to your jurisdiction. It's not as simple as "raid the electronics parts bin" since the equipment must be mains rated.