How can I delete all mail from gmail stored on my Android device?
Gmail account is directly linked to the internet and stores few bits of data onto the device. Even if you are not connected to the internet, the data will stay on your device. Logging out of the Google device will remove your preferences or settings, but the data can on your device is still visible. To remove the data, you need to do a factory reset, which will wipe out the entire data (including your internal memory file). 
This can be done in two ways, reboot from settings, Settings --> system or about phone --> reset --> factory reset. 
Or manually by switching off the phone, and then pressing power and volume down button simultaneously. You can find more information here https://www.androidcentral.com/how-factory-reset-android-phone