(Author here) The aspect of flexibility is really interesting. On the one hand, the lecturer role is way more flexible in that I can get my prep work done whenever I want, and if I did find myself all done with prep, I could garden all day instead with no guilt. (That happened once in my 1.5 years!)
On the other hand, there's a lot that's more inflexible than in a SWE job: lecture times, university-dictated exam times (at night! I had to sleeptrain my toddler to make them), staff meeting times (hard to find a time that works for a staff of 50-100).
So yeah- more flexible in some ways, less flexible in others, it depends what sort of flexibility you're looking for.
On the other hand, there's a lot that's more inflexible than in a SWE job: lecture times, university-dictated exam times (at night! I had to sleeptrain my toddler to make them), staff meeting times (hard to find a time that works for a staff of 50-100).
So yeah- more flexible in some ways, less flexible in others, it depends what sort of flexibility you're looking for.