Rooting Sony Xperia xa2 ultra I permanently deleted my "DCIM" folder from my internal storage while connected to my pc using a usb cable, before unlocking the bootloader and factory resetting my phone and rooting my phone and doing all that stuff, i was wondering if im able to recover all those files from my internal memory?
By default modern device like your XA2 Ultra use an hardware encrypted user storage. This means a factory reset should not only delete your data but also delete the encryption key. 

Therefore after unlocking, factory reset and rooting the encryption key has changed and your data is not recoverable.