I like the idea that arbitrary constraints can actually improve writing. Without a constraint, it's easy to fall back on familiar phrasing, while having to work around something unusual forces you to reconsider each word. I wonder if this applies to programming and other creative work too.
It does. It’s a know aphorism that constraints bread creativity. A couple of examples (one of deliberate constraints and another of accidental constraints):
Brian Eno and Peter Schmidt created “Oblique Strategies” as ways to challenge yourself.
https://en.wikipedia.org/wiki/Oblique_Strategies
The Köln Concert, which is “the best-selling solo album in jazz history and the best-selling piano album” was improvised because there was a mixup and Keith Jarrett was given a terrible piano.