My problem is SOLVED after following this guide to (re)flash stock Android: https://xdaforums.com/t/androxyde-flashtool-09-23-1-linux-32-bit-for-use-of-fsc-script-also-adb-and-fastboot.3765076/#post-75930721
After using that guide instead of the other tools and tutorials I had tried, I was able to progress to the custom ROM installation, which succeeded.