What if the demon WAS David?
So in the beginning of the movie, the mother says that the ghost can not be David since it molests the daughter. That's her reasoning.
However, these are merely assumptions. And what a demon is and isn't, is also assumed throughout the movie. There is still a possibility that the demon/ghost could be David, since the mother was trying to communicate to him at the end of the day, and his dead body's ashes were used for footprints.
I generally think it's not David, but we can't completely set aside this possibility either.