Part of the problem with Oppau was that they were dynamiting a 50/50 mixture of ammonium nitrate and ammonium sulfate, which they thought was safe. It turned out that dynamiting such a mixture isn't safe after all.
As always, safety regulations are written in blood.
and it seems they actually knew it. from wikipedia "Two months earlier, at Kriewald, then part of Germany, 19 people had died when 30 tonnes of ammonium nitrate detonated under similar circumstances. It is not clear why this warning was not heeded"