[Moto G5 Plus Guides, News, & Discussion] FailSafeNow:
Ok. Update. I tried Nougat. And it was not good. It was bad. Very bad. It wouldn't boot into the system no matter what I did. In fact, it got stuck in a bootloop, with a wavy circle and the word "Erasing". Reboot, bad key, "Erasing", reboot, bad key "erasing", etc.

NOW:

I think there's only one option for me at this point. Someone someplace at some point spoke about the dirty trick of flashing the boot image to the recovery partition. Very dirty indeed. But I tried it. I tried it with the patched Magisk boot image. My device boots into the system directly now. (Well, after the "bad key" screen.)

Now, I thought maybe I could do the reverse, and have some way to still boot into Recovery. You know, flash TWRP to the Boot partition. It's a$$ backwards, but if I can flash the boot image to the Recovery partition and have miracles, why not the opposite? Well, it wouldn't do. Not with Fastboot. And when I put TWRP in the normal place and then tried using it to flash the TWRP image to the Boot partition, it told my why: not enough space.

So unless someone knows a trick to either make this phone boot the way it's supposed to, or just make the boot partition bigger, I don't know what to do.

EDIT: I found an earlier version of TWRP (3.5.0) that was small enough to fit on the existing boot partition. This was not what I wanted, but it does work. SO:

If I just reboot, the phone boots normally, but ONLY BECAUSE the Boot image has been flashed to the Recovery partition.

If I actually want to go into Recovery (you can't make me!), I have to reboot to the bootloader, and then choose Start, which normally would just start the phone but in my case takes me to TWRP BECAUSE TWRP has been installed in the Boot partition.

This whole setup is completely backwards, but for now, it works. If anything wants to modify the Boot image down the line, it's going to go looking for it in the wrong place, and that could cause problems. But I don't think anything is liable to want to do that any time soon. Magisk is installed, and when it adds modules, they genuinely don't target the Boot partition, do they?

Anyway, I hope this business of swapping the Boot and Recovery isn't going to give me problems down the line. If not, we have found an adequate workaround for my problem. It's not ideal. But so far, it seems to be working. I'll let you know if any other problems arise.

Now, it seems to me that the problem all along had nothing to do with verity or any of that, but with the phone wanting to boot from the wrong partition. I don't think it did any kind of check and said, "Uh oh! Problem! Abort system boot! Boot from Recovery!" I think it said, "Everything looks great. Continue standard booting procedure from Partition N." Except Partition N isn't the Boot partition: it's the Recovery partition.

So: What controls that? How do we change that specific step?

I could be totally wrong. Maybe the phone really has been saying, "Something is not right. Getting Error X. Boot from Recovery." In which case, how do we change that? How do we rewrite the instruction so that in case of Error X, the phone just boots normally? There has to be a way! It's all software!