They were arrested for mass distribution, not for writing. Keep in mind this law was written before the internet, back then distributing 5000 copies was a fairly large operation. I don’t think the writers of the law foresaw a future where distributing 5000 copies of a work could be done instantly and in many cases for free (although the punishment is more severe based on income)
I’m only clarifying the facts. My personal opinions on the matter are quite different.
Do you think people should be arrested for writing an erotic fiction book?
No, but I don’t think posting misleading headlines in an English-speaking forum is the way to change that.