When I worked in Boise, it was possible to buy oak cheaper than pine, so we made a lot of custom trim (and everything else) out of it, with half painted and half not.
You’ll have two challenges, getting paint to stick to poly and filling pores enough so it looks smooth enough for your taste. Cleaning the surface with tsp (or dishwasher detergent) prior to sanding, especially anywhere hair spray or oils from cooking might have settled.
There is no way around sanding every surface so a primer has a better chance of gripping. Small profiled sanding blocks for curved profiles are a must have and reduces sanding effort 2x and produces a better end result. 150 grit sanding marks generally cover ok with most hand painted latex paint, and 220 grit for sprayed thin glossy latex or lacquer.
I’m a big fan of thin sprayed shellac as a primer coat - shellac sticks to everything and everything sticks to shellac. If you’re brushing, regular inexpensive Kilz2 primer sticks very well - one of the few primers that is hard to peel out of a plastic paint bucket.
I haven’t mentioned filling the pores yet, because it’s the most controversial, time consuming, and just a big pain in the ass. Curved profiles might be fine without filler, but flat areas often look odd unless the pores are mostly filled. High build primer over Kilz2 followed by a lot of sanding would work, but it’s a lot of sanding - too much sanding. A lacquer spot filler applied with putty knife will stick to sanded poly prior to priming, but it’s expensive and slow to apply. I like a trowel grade hardwood floor filler after priming - use good quality flexible putty knives as wide as the board and add just enough to barely fill the board, and sand before it’s completely hard. This leaves some grain.
There are other products for filling grain, but this has worked well and sticks better than most water based wood filler. Thin with water as needed to keep it easy to apply. There are some clear pore fillers, but I haven’t used them.
This guy I usually agree with talks about every aspect of painting and repainting: