You need bare wood to get a good glue joint (as you mention). If you finish first, you just need to protect the wood that will be part of a glue joint with painters tape or something. Sometimes this is easy to do and sometimes it is nearly impossible.
Most of the time, I finish after glue and work to minimize glue squeeze out (you can also protect the wood with tape in this case as well to catch the glue) but I have had projects that finishing first was definitely easier.
If you want a bunch more opinions, here’s a decent link:
My issue is that using painter tape on my current wood ( high sanding birch plywood) when I remove the paint it makes the surface fuzzy with small wood needle that I need to sand again. Same has any moisture. So cleaning my wood glue with water ( usual trick) attacks the finish. I decided to try glue then varnish but I have doubts it will be enjoyable with the nooks and crannies.
Removing tape from the wood that is to be glued might be ok since you wouldn’t need to sand it again - a bit of roughness wouldn’t hurt the glue joint…
I made some boxes last month where I dyed one side of the plywood and then use water based polyurethane so that the color was not muddied. The other side was raw wood. I then cut so that the colored side was on the outside of the piece. The finger joints were quite tight, so a couple of drops of CA resin meant for wood keeps it together. The I used Danish oil on the inside so it could be wiped off from the colored side. This methods worked well for these boxes.