A Wall Street Journal article today pointed out the spike in refinery margins amidst the recent escalation in gasoline prices, and I can't resist weighing in on this increasingly important subject.

And with Congress wading right in next week, I have to advise doing some homework in order to understand the connected pieces of the industry's past and present.

First, the Journal's article generally is correct. Yes, gasoline has reached a national average of about $3.10 a gallon, with significantly higher prices in some locations. Yes, pure refiners like Tesoro (NYSE:TSO) and Valero (NYSE:VLO) are "pocketing more than $30 in profit before taxes and other expenses" on every barrel. Yes, big integrated oil and gas producers ExxonMobil (NYSE:XOM) and Chevron (NYSE:CVX) did offset lower exploration and production income in the past quarter with higher downstream (refining and marketing) profits.

But refining and construction projects in Asia and the Middle East may not "help fill the gap between domestic supply and demand," as the Journal claims. With China alone adding meaningfully and steadily to its own demand for refined product, whether those faraway refineries ultimately have any real effect on U.S. gasoline prices seems open to serious debate.

Also, remember that the refining industry faced much lower margins 20 years ago. Those puny profits, coupled with a plethora of regulatory roadblocks to new construction, are largely why we haven't added a new refinery in the U.S. since 1976. They're also why we have fewer than half as many domestic refineries sill operating as we did in the early 1980s. Those fewer units are working mightily to keep up with product demand that refuses to dwindle, almost regardless of price. The result is the outages that we've faced of late, as tired, overworked equipment occasionally has given up the ghost.

I urge caution to Rep. Bart Stupak, D-Mich., and the other legislators who will attempt next week to uncover evidence of price gouging by refiners and marketers. Energy economics are both complicated and transitory, and they're likely to become more so. Be certain you understand all of the complexities of the past and present energy picture before you enact something that ultimately could be punitive to the American people.

And to Fools attempting to make heads or tails out of the energy investment picture, I'd urge particularly careful attention to domestic integrated companies, such as ExxonMobil, Chevron, or ConocoPhillips (NYSE:COP). Those companies clearly are best equipped to smooth out the upstream-downstream income oscillations that are likely to remain the order of the day.

For related Foolishness:

Fool contributor David Lee Smith does not own shares in any of the companies mentioned. He welcomes your questions or comments. The Motley Fool has a disclosure policy.