@flohack Hello,
Last year I had to reinstall Android for some months and I used LineageOS. This Android version allows you to run the selinux commands without the need of Magisk. It allows you to run adb shell commands as root with a simple checkbox in the developper settings.
I was happy to discover this possibility with LineageOS as I had already restored my data on the phone