Irene had miniature explosives fitted throughout that would destroy the phone if anyone attempted to remove the hard drive, there being only four attempts permitted with unlocking the phone before the explosives would detonate.
Fine, but Sherlock doesn't need to unlock the phone. According to Irene (and common sense too) the pictures on that phone are exclusive and there shouldn't be any backup online or offline, otherwise the govt. agents could have gained them easily in other ways.
So, in that case, Sherlock can hand over the phone to govt. officials, they can take the phone to a dumping ground, pour petrol over it and destroy it physically or by any other means they prefer :P
......So why not?
Irene's phone might also contain information about terrorist groups (as Irene said to Mycroft that the lives of British citizens are at stake if the phone is destroyed, although not confirmed whether this is true) which might help the govt. in tracking them down but when it comes to scandals, most royal families, ministers or high profile politicians would rather be selfish and let people die out of terrorist attacks rather than compromising their dignity. And although Moriarty is a criminal mastermind and other criminals in "Sherlock's world" are deadly, Moriarty is still no Osama Bin Laden :v :v, that he would launch terrorist attacks on the scale of 9/11 :P