Now we can't be really sure if Danzo really knew who was responsible for the attack 16 years ago but the thing is that even if he knew that it wasn't the clan to be blamed, he would want to wipe it out, either to gain their eyes to fullfil his own ambitions which if you ask me was even to unlock the rinnegan since he had his arm experimented with senju dna, or he just considered them a potential thread and used the attack as pretext to kill them.
Also, you say that Danzo wanted Obito dead. Yes, after knowing so much about his dirty jobs as well as being a very dangerous man who had completed his role in the massacre, he had no furthte use of him and just like with Kabuto, he wanted to get rid of him.
Aside from that, it's funny that you say that the cooperation was between Itachi and Obito instead of Danzo and Obito. But remember this, Danzo was the one who forced Itachi to do the massacre so who doesn't tell you that he had planned it all along with Obito by taking both of them the sharingan.
The massacre was a job that needed both of their cooperation.
Obito alone couldn't wipe out the whole clan alone and same goes for Itachi. And when I say Itachi, I mean Danzo because he was the one wanted to do it and he needed someone who was a ghost, someone who wouldn't show signs that Danzo had anything to do in all this. Obito was the perfect candidate, he was like a ghost, after his "death" it's like he didn't exist after.