Flashing DOES NOT fail, we patch and flash the patched boot img and have the Magisk up and runningI've thought about a similar way to get ramdisk= yes on such devices too, but it would be a little messy, and can't be the way you described, simply 'recognizing the existence of ramdisk when patching and remembering', because existence of ramdisk is not the problem (and nothing is 'remembered').
The problem is that such devices did NOT use ramdisk in boot image, so generally they use a bootloader that is no longer compatible w/ ramdisk, so even if ramdisk is ADDED SUCCESSFULLY to boot image, (and I believe this is always done if ramdisk is not present), and Magisk is successfully added to boot image also (ie patching is wholly successful), the Magisk Installation will STILL fail due to bootloader, and, as John says, Magisk has no way to see bootloader compatibility.
Xiaomi devices just happen to use ramdisk compatible bootloaders, probably because they never rewrote the code fully, which is to our advantage because John has done us (Xiaomi etc users) a favour by adding a 'manually add initramfs if not present' feature to Magisk.
So Ramdisk= no correctly means no FACTORY ramdisk in boot image. To make it mean no ramdisk without qualification WOULD involve adding a memory feature to remember a successful boot with root before changing this flag... as I said, could get a bit messy (otherwise I might have suggested this as a feature also). PW
About 'remembering', finding and declaring that there is no Ramdisk, look at my previous post and the log attached there