Unfortunately I have no specific data on detonation when running hydrogen. It was just a random sort of thing that popped up in an article on using hydrogen as a fuel for vehicles operated in enclosed spaces like warehouses and mines, so as to eliminate carbon monoxide.
Detonation and preignition are two different, though related, things. Preignition happens when the charge is ignited too soon, either from compression or from a hot spot in the engine. Detonation happens when the charge, having been ignited at the proper time, explodes instead of burning smoothly. The flame front moves much more rapidly when burning hydrogen, and the result somewhat resembles detonation. This also happens if oxygen is used instead of air when burning gasoline.
Exhaust gas recirculation (EGR) is a method of ducting part of the engine exhaust back into the air intake. This dilutes the incoming air and effectively reduces its oxygen content. The result is lower flame temperatures, lower formation of NOx, and of course lower efficiency. It also slows the propagation of the flame front.
Neither hydrogen nor natural gas (methane) will ignite due to compression. When they are used in Diesels, they require an oil injection to light the fire. One method is to set the fuel injectors for a fixed idle on oil, then when additional power is required the hydrogen or methane is added to the air intake.
Distilled water would seem to be a good idea, but unfortunately distilled water is all but nonconductive. An electrolyte will have to be added. Tap water usually has enough impurities to make it conductive, but will eventually deposit sludge. The likely solution is to use an electrolyte in the cell, then use distilled water for make-up as the water in the cell is dissociated.