Do you want it to look like wood (some sort of stain or clear), or are you eventually going to paint it?
Here's my $0.02: if the latter, just take it out (since you were already going to do that anyway) and put in similarly-sized Azek board (it's easily ripped to fit). Hand sand the edge with 220 to soften it a little, or use a router if you want something more specific. You'll never have to deal with rot again.
I'm doing exactly this to the trim around my garage door this spring. Am fuggin' sick of seeing trim get soft over time. No more.
Check with your paint supplier for the right kind of paint. With one Azek project, I used exterior Moorglo with no primer and it was fine, but I'm not really a fan of Moorglo. I had a gallon of it (in white semigloss) sitting around, so I used it. I think they've tinkered with the formula with that stuff in the past few years, because it seems to go grey in a couple of years. For the price (definitely not cheap!), it's just not worth it. That's been my experience, however.
On another project using Azek, I used the Behr premium stuff (forget the name, but it was semigloss white from Home Depot), 2 coats with no primer, and 3 years later it's still looking fantastic. Go figure. Just make sure the finish is nice & clean. I wiped mine down with acetone before painting.