stuck at "updating partition details" while installing magisk
As u mention: if the "Updating partition details..." take more than 4 hours: You have a problem.

As it's noted on the XDA OP, have u flash the "no-verity-opt-encrypt.zip" file ? Apparently it's necessary to completly disabling the forced encryption on your phone.

Try to flash directly the Magisk uninstaller zip, reboot in TWRP, and try again to flash Magisk v16.