I would clean the cabinets well, use wood filler for the holes, sand, them prime and paint.
I am a painter---so I paint everything. That being said...I'd never paint anything made of wormy chestnut. It is a rare and precious wood with a gorgeous grain. The Chestnut tree was all but wiped out in the early 1900s. I would strip the cabinets and poly to preserve the natural beauty of the wood.
If you want to keep the look, sand as best as possible and paint. Then add a glaze so that it blends.
If you don't want to keep the look, you can fill and sand perhaps. Depending on the pattern.
I like Baxter's comments. Good quality wood cabinets should never be painted.
That’s a pretty serious rare and expensive wood you’ve got there, you might consider not painting it.