In reply to Daniel James.

Testing before release in real world environments like an average shop with at least a few 100 products and variants and a few 100 customer accounts with purchase history and typical million-in-use plugins for SEO etc. would help.

As long as testing is only based on some automated unit tests or at most simple fresh installed sites with 3-5 products, the described problems will occur again and again…