If I can, I assembly any parts possible before painting. I have used all of the above, scrapping or sanding away the paint is not fully reliable. I typically hit parts with some sort of sanding stick if I have preparinted them and need to remove paint from a surface to be glued. However there are times where I just insert the part and glue flying on the glue to devolve enough paint for it to all work. It all depends on how the parts interrelate and how tight the fit. If parts can somewhat hold themselves together then I might just add glue after the fact no sanding, scraping or masking.
However something like a formla 1 wing plate needs great care as I have really butchered some of those trying to glue them together after painting and trying to sand the surface. If the wing is plastic, I think it might be best to glue it all together, then mask and paint it.