So if you caulk first and try to paint over the caulk, the paint will build up more on the heavier edges of the caulk. That doesn't look good.
If you caulk first and then paint but not the caulk. Wow that is a ton of prep or "after-work" and no way in the world it will look great unless you are a pro painter.
I guess this is easy because we do so much work with white cabinets and trim. This should just be a tiny line of Dynaflex Ultra AFTER you paint. The fact that you have already filled the gaps means your caulking should literally be unnoticeable and seamless after because you will be using the thinnest line you can pump out.
I am in no way affiliated with Dynaflex. I have used this caulk for 15+ years for all white trim. It does not shrink and for sure doesn't crack or yellow. It is an absolute must for the top of white trim. Using it for cabinetry is a much easier use case.
The issue with silicone other than any mechanical issues is that it is too shiny. It sticks out as plasticky - while this look is often sharp with tile or metal it is tacky for wood. As for paintable caulk I for one hate it. The paint never sticks evenly. It is a last choice if we are doing a one-off color and we can't get matching caulk.