Could you please kindly elaborate on that?
From what I understand, the process of rooting a Fold 3 with Magisk is to get the corresponding app as an APK file, using it to patch the AP part of the stock firmware which comes in several parts (AP, BL, CP, CSC) and then flashing that very AP result with Odin.
Also, the rooting guide as a requisite for the Dr. Ketan ROM sounds like after having flashed the patched Magisk AP file, one still deals with the stock recovery:
You needs to download stock firmware (You can get stock firmware with Frija) and extract AP*.tar.md5 file and patch with magisk. Flash patched file with AP tab of Odin
Reboot to recovery and select to format data (Factory reset option on stock recovery)
So I wonder at what point TWRP necessarily comes into play here. Is it contained as recovery as part of the Magisk patching approach?
Furthermore, is it still (June 2022) the case that encryption and that DEX function only works in conjunction of a /data partition formatted by a stock recovery instance or are there meanwhile versions of TWRP which can handle the encrypted part?
At least with an old Galaxy Note 8, I got Magisk running with TWRP and encryption (at least, a password check during bootup is possible, probably only Samsung knows how much that encryption is worth to begin with).