Goals from teenager Afolabi Obafemi and Rhys Murphy either side of the interval looked to have the Daggers in cruise control as they led the struggling Shakers by two goals.
However, Anton Forrester scored from the penalty spot to reduce the deficit in the 89th minute, and then the woodwork came to the hosts' rescue as Bury's Gareth Roberts fired an effort against the post deep into stoppage-time.
Hackett said: "Of course we're really happy with another three points, but towards the end of the game we could have been better, we could have coped with their threat in a better manner.
"At 2-0 up we should have gone on to secure a comfortable victory, but we didn't press on enough and a bit of naivety almost cost us at the end.
"Bury were always going to go for it late in the game once they'd scored their penalty kick, they threw the kitchen sink at us.
"Thankfully we held on, so we have to learn a few things from that. We've been a bit silly in certain situations, but at the end of the day we've won again and our unbeaten run goes on."
Hackett was keen to praise teenager Obafemi, whose splendid opening goal was his first in senior football.
The Daggers coach added: "Afi really is a talent, we all keep telling him that.
"I was really pleased that he got his first goal. He's quick and agile - in fact I don't think he realises himself just how quick he is.
"Let's hope this will be the first goal of many for him now. He's got huge potential."
Daggers maintained their unbeaten home record so far this season.
In fact, their current run reads no defeats in five games, and just one reverse in their last nine league and cup fixtures.