Look, if we are talking about a warranted search in the US then I'd agree with you. However, the entire point of CPB's unwarranted search authority is to stop contraband from coming in.
This would be like arguing that throwing away materials illegal in the US before boarding a plane is destruction of evidence.
Like, even if we assume exactly what CBP's claim is true, it was to stop CSAM. And the person had in fact had CSAM. Destroying the CSAM before getting to the US would be legal even though the US doesn't like it.
Further, if the data is actually backed up, then you haven't actually destroyed it and CBP or another agency can provide you with a search warrant for what they are looking for. But I'd note that this is far outside of CBP's authority. They are for stopping contraband, not FBI work.