According to Catholicism, is it ever permissible to produce physical evil so that good may result? In Romans 3:8, Paul teaches that it is wrong to do evil to achieve good:


  And why not say—as we are accused and as some claim we say—that we should do evil that good may come of it? Their penalty is what they deserve.


This principle is explicitly reaffirmed by the Catechism of the Catholic Church, paragraph 1789. However, in Catholicism, a distinction is drawn between physical evil and moral evil. "Physical evil" is what St. Thomas Aquinas would call "corruption* and defect" ("corruptio et defectus"), corruption being the change from existence to non-existence.***cf. "What are “generation and corruption” in Aristotle's philosophy?"**Summa contra Gentiles III cap. 71 ("That divine providence does not entirely exclude evil from things")

According to Catholicism, is it ever permissible to produce physical evil so that good may result?

My understanding is that the answer is yes. For example, when performing a medical surgery, it is acceptable for the surgeon to intentionally damage the patient's skin (physical evil) as a means to saving the patient's life (a good end). I want to make sure I'm thinking about this correctly. I would most appreciate answers drawing on quotes from the Magisterium, but I'd also appreciate relevant quotes from Catholic theologians.
is it ever permissible to produce physical evil so that good may result?


Yes, it is permissible to destroy ("produce physical evil") in order to effect good. The human manner of creating things always involves destruction because we create with preexisting matter; only God can create something "out of nothing" (creatio ex nihilo). Creation in itself is morally neutral.

Think about Michelangelo sculpting a statue. He first has to destroy ("corrupt") the lump of marble in order to bring about a new form in it (with a lot of scrap marble he chiseled leftover!). God's mode of creation is much more perfect; He could simply bring the Statue of David into existence from nothing, with no preexisting marble (and no leftover debris!).

Also, it seems you're really asking about the principle of double-effect, which allows for doing harm in order that a greater evil not result (e.g., amputating a gangrene leg so that a person doesn't die). See Summa Theologica II-II q. 64 a. 7 or §2.5 "Moral Norms Especially Relevant to Health Care" of Health Care Ethics: A Theological Analysis.