Securely delete data from the old phone
Unfortunately, it is almost impossible to delete data on your phone with 100% certainty, but it is usually possible to live with 99.9%. However, there are a few things to bear in mind.
Modern iPhones and Android phones already have hardware encryption; if the device is very old, this still needs to be activated.
After a possible backup or transfer of the data on the phone, it must be reset to the factory settings.
When resetting, you should of course ensure that all data and settings are reset and not just the settings.
The private key for the previously saved data is usually also lost in the process. With a great deal of effort, however, this key could be restored and the data could then also be restored from the free storage space.
To prevent this, it is advisable to overwrite the free storage space after resetting to factory settings.
Here we encounter another problem. The files are saved in sectors of e.g. 4 kilobytes. If we now write a text file with 1 kilobyte in such a sector, 3 kilobytes remain free, but are displayed as occupied. These 3 kilobytes could therefore also be restored with greater effort (as described above).
We therefore overwrite the storage space on the old phone again as best we can with very large files (e.g. videos) in order to (completely) overwrite as many sectors as possible; you may also find a good app for this.
However, the last few megabytes will be a little more difficult because the phone will always complain that there is no more storage space available.
The best way to do this is to connect the phone to a computer and try to fill the last few places with useless data such as videos or, if necessary, music.
Once the phone’s memory has been filled, we reset the phone to the factory settings again.
Most of the free storage space has now been overwritten and even restoring the original device encryption key would not lead to any significant results.
Only small amounts of data could remain (see above), which is why 100% is not guaranteed.
This would be problematic, for example, if very sensitive data was stored in text files, as such text files are very small and therefore artefacts often remain.