Borussia Dortmund narrowly escaped an upset in their DFB-Pokal first-round match, edging out third-tier Rot-Weiss Essen 1-0 at Stadion an der Hafenstrasse.