A nice clear and comfortable line is that the police can conduct a physical search that increases their safety. Stored data is generally not physically dangerous.
That is generally the purpose of the exception, but the other purpose is preventing the destruction of evidence. Maybe the rule should be that the police can secure but not search the cell phone during an arrest, and have to get a separate warrant after the fact.
This sounds reasonable so the eventual ruling will probably be something totally orthogonal.