These pitfalls are one reasons why I built Reshape [0], which aims to automate zero-downtime schema migrations.
I can’t say it avoids all of them but we are working on a new product that would. If you are interested in this space (and Postgres specifically), I’d love to hear from you: fabian@reshapedb.com