Having or getting corrupted save data can happen at any given time due to a number of factors, whether you have physical or digital media. They both have the same extremely low chance of getting corrupted data.
There's no need to be paranoid about losing your own save data; all you have to do is watch what you do. Taking out the game cartridge while saving can cause problems; and for digital copies, the same thing applies when you're taking out the SD card.
Only factor is personal preference with digital vs. physical.
But if you're that paranoid over losing data, Pokebank seems like a viable option, because it's being uploaded and saved onto Nintendo's servers. (although what's the point of saving Pokemon there and not being able to use them?)
But in terms of having the game itself corrupted, technically the digital copy is safer, because if your digital copy of the game gets corrupted, you can re-download it via e-shop (unclear on Nintendo's policies towards re-downloading titles though).
lf you get a corrupted game on a physical cartridge, there's nothing you can do about it.
Anyways, just keep whatever copy of the game you currently own, and take care of your stuff, it should be fine.