Average_joe The photos and files aren't sent in the first place (unless you use google photos and/or google drive)
And Gboard does "Share usage statistics" with Google and It also uses Federated learning to "Improve for everyone" using Gboard. Gboard also personalises for you without sending any data. You can opt out of "Share usage statistics" with Google, "Personalise for you" and "Improve for everyone".