You can use a tool like payload_dumper (sadly the excellent payload-dumper-go still doesn’t support it) and feed it both the factory images and the corresponding OTA update file.
The Magisk route would involve installing the B.069 factory images and updating to the current OTA (or, if you haven’t messed with your phone and are up-to-date, starting where you are) and then it’s basically this …
… just use the current Magisk release and this B.079 boot.img instead, the rest hasn’t changed.
There’s still a risk involved, always check fastboot flashing get_unlock_ability immediately before locking the bootloader, never boot into Android userland and lock it afterwards.
If your phone doesn’t start (B.079 should be patch level June, but who knows …), you should still be able to just unlock the bootloader again.