Things started poorly for the Sky Bet League One side as defender Nugent marked his debut in acrimonious circumstances in the 15th minute.
Josh Scott's scuffed shot was turned past Jack Bonham by the outstretched Nugent, although referee Pat Miller took a moment to award the goal, consulting his assistant who had initially flagged Rhys Murphy offside.
Scott then came close to doubling the visitors' lead early in the second half when he guided a header on to the crossbar with Bonham off his line and nowhere near the cross.
El Alagui was introduced but was soon shown a yellow card for diving early in the second half, although he soon redeemed himself as he was on hand to steer the hosts level on the hour-mark after a scramble in the penalty area.
The League One side were soon ahead as Fillo, making his full debut after his loan move from Viktoria Plzen, struck a low shot past Lewington before Dagenham levelled with just over 10 minutes to go as Scott converted from close range.
But Bees striker El Alagui headed home a deep free-kick four minutes into injury time to put his side into the draw for Round 2.