The reason why I asked this is because I had magisk installed and I decided to install Riru and Riru EdXposed and now SafetyNet keep failing (I knew that if you install Xposed your phone will fail SafetyNet check), so I removed them and after rebooting my phone the SafetyNet check kept failing no matter what. So I decided to format Data, Wipe Dalvik and Cache and install 21.4.21 again hoping that the safety check will pass, but it didn't. Whenever I check SafetyNet with Magisk it fails but when I check it with any other app on the Play Store it passes. That's why I asked if is safe to wipe Internal Storage (and then obviously copy the ROM to my phone).