that's what I had in mind too. But then, how do I wipe system in the first place? TWRP 3.6.1 and 3.6.2 only offer to wipe Cache, Data, Internal Memory, USB, or Vendor. But no "wipe system". In addition to that I can "format data" which I think is like a factory reset (which I never was able to run, always resulted in runtime errors, but that's a different story)
From my older devices (Sony Xperia) I know that TWRP has this "wipe system" option.
On the other hand I don't remember ever having seen a "wipe system" option in LOS recovery when I was running it during first installation. So question is: how would I wipe system in the first place? Is that possibly a fastboot or adb job?