Would it violate the Texas Code of Judicial Conduct for an appellate court in an opinion to “confess to an impulse to safeguard an industry that is vital to Texas’s economic well-being” and describe the “blessing” of being “a conservative panel on an intermediate court in a relatively conservative part of Texas”?

Yes, that would violate the Code, and a Texas court violated multiple Code provisions with its opinion in City of San Francisco v. Exxon Mobil Corporation, No. 02-18-00106-CV (Tex. App. – Fort Worth, 2020) (Kerr, J., joined by Birdwell, J.; Sudderth, C.J., concurring).