The provider will probably use the built in "restore to factory" procedure which is supposed to delete the file system allocation information and change the encryption key. The encrypted data remains largely intact in the memory, but it would take a very sophisticated attack to retrieve and decrypt it.
A more secure approach involves subsequently overwriting the memory with benign data and repeating the factory restore, but this is time consuming so the provider is probably not doing so. Unless you're being targeted by national intelligence agencies with a lot of time on their hands, it's overkill.
If you are being targeted by state actors, then physical destruction of the phone's memory devices is in order.