Removing data without formatting the iPhone
Suppose I have a very simply notes app that does not use iCloud. All it does is simply save strings of plain text to files and retrieve them.
How securely is the data associated to the app (the text files) on the actual phone disk deleted when deleting the app? For example: by holding on the app icon and deleting it vs. formatting the whole iPhone.
Can it be recovered with special software/hardware?
Assuming you're not talking about a very old iPhone (i.e. iPhone 5 or older), then every file created by any app is actually encrypted on disk. The plain text content is not stored on disk at any time.
In addition, every file is encrypted with a unique key - i.e. there's a seperate key for each file. The key for the file is stored alongside the encrypted file contents, but encrypted with a so called "class key" (depending on the settings in the app). This is the foundation of the key hierarchy in Apple's "Data Protection" scheme.
When you delete an app manually, all the files stored locally by that app are deleted. This deletion of each individual file is actually done by simply deleting the per-file key. This makes it possible to delete even very large files quickly and securely at the same time.