After yesterday's mishap, and of realizing how lucky I was to still be in one piece, it is time to take a deep breath and after looking into what went wrong, follow all the safety measures to prevent one such event from ever happening again.
I started by getting a new lid for the electrolyser and putting a new seal rubber in it, this time with two clamps instead of one. Now only the clamps are used for holding the lid. The original ring around the lid was discarded. By itself this doesn't provide extra protection against an explosion, apart from the slight probability of the lid popping out in one piece instead of fragmenting into several pieces (today I still found fragments of the lid in distant corners of the room).