Painting over stained shoe molding
I would use a shellac based primer after roughing up the surface. When doing this kind of work I use a tool that holds a roll of tape and paper 4” to 12” wide paper (hand mask dispenser) this helps to put the tape right at the joint and the additional width of paper really helps to catch drips , sloppy brush marks, I hate painting so I get tools to make it as easy as possible.