It sounds like now through retirement you'll be in the 15% tax bracket. For a married couple, the 15% bracket extends from $78,751 to $250,000 (the literal bracket extends higher, but net investment income tax kicks in at $250k - see
https://www.irs.gov/taxtopics/tc559). I don't think you're going to avoid paying 15% on shares you sell.
If you want to donate to charity, then I'd be the 5th or 20th person suggesting you use a "donor advised fund". When you donate stocks without selling them (and they have been held over a year), you can skip paying taxes on the gains, and take the full value as a donation. Fidelity and Schwab are better than Vanguard, in my view, because they offer lower minimums to start ($5,000).
You could also take the view that it's better to delay taxes - to avoid selling now, because you'd owe taxes. That lets more of your money grow for a longer period of time.
There's also diversification - how big is this stock allocation, relative to your other investments? If it's small, maybe the concentration in the energy sector doesn't mean as much. If you were just starting out, anything that happens to those two companies has a huge impact. The larger the share of your portfolio, the more you should reduce the risk and sell these two energy companies.
Just so you know, right now oil is at a rather low price, and fears of the virus outbreak in Wuhan are causing people to cancel travel plans - and further drop the price of oil. Energy companies are doing worse than average right now, and it would be reasonable to expect conditions get better for them within a year or two.