It is a good industry to learn from. I'm not suggesting SW should become exactly like aviation.

It indeed is and I like this analogy a lot. A lot of critical systems can definitely learn from aviation. It's one of the finest balances of humans and automation.

But there is a lot of software in aviation. And it is slow to develop, and expensive. And it has defects.

In general, it is of high quality.