The way i do it i get 0 reboot on my g935w8
I flash stock rom
I do a Format data
I install rom
I flash mind the gapps
I flash magisk 16.7
I do the first step
And if i get reboot in the install
I do a advanced format
System,data,dalvik,cache
Install rom
Mindthegapps
Magisk 16.7
Maybe it...