As to the particular issue, I’m afraid it is extremely naïve to believe that “all traces” of such material can be deleted from electronic devices. Once created and sent, such data lasts forever. As a rule of thumb, you should never send through email or text anything you would be uncomfortable to find plastered to a freeway billboard. Even before the technological advances of the cyber age, it was very difficult to destroy all traces of such material once created.
As to whether or not this is moral, the morality of the matter depends on the content. If it was of a third party, then it constitutes the use of pornography. Even if it was of one of the spouses, the context of your question suggests that impure activity may have accompanied the exchange. Either way, this is indeed something that should be confessed.
Natural Family Planning is not just about abstaining from the conjugal act. It is also about respecting the bodily integrity of persons. Treating a spouse as a sexual object, indeed as a sex toy, destroys trust, marital intimacy, and the self-discipline necessary to make NFP successful.