I went from stock 10 (whatever is current on Marlin) to unlocking bootloader, and then flashing the Lineage recovery (which flashed fine and functioned as it should). I didn't see any bootlooping.
When I try to install TWRP (either the latest 3.7.something, or 3.5.0, I would boot from the temporary recovery image, then adb push the zip installer across, and then install that via recovery. When I would then reboot into recovery again, it seemed like it didn't "take" and it would bootloop.
I ended up fastboot flashing the lineage recovery and that one allows me to flash Lineage 18.1 without any issues.
I will give it another try here later if i have some time. I dug through more of this thread and found some detailed instructions on how to repartition manually - which looks complicated, but might be worth trying.