Some doors in my apartment are subject to seasonal changes, similar to what is described here. I made adjustments: shimmed some hinges, shaved off some material here and there with a planer, and the doors now close reasonably well. But the door moldings have quite a bit of seasonal play. There are gaps in the miter joints that show up in the winter and almost disappear in the summer.
I also installed two interior doors last summer. The way the doors open and close do not exhibit any seasonal variation, probably because I used screws to install door casings. I also filled the gaps behind the jambs with foam. The whole assembly is therefore very rigid. But the molding is again problematic. In a couple of places there are now gaps, very distracting because they appear as a black tear in the white paint.
What should I do to mitigate this? I am tempted to caulk the gaps and repaint, but I am not sure if this is a good idea: come summer time, the planks will expand and might pop out, or bend, or push other parts out of place. I also considered filling gaps with wood glue mixed with saw dust.
Is there a general recipe to avoid these type of problems in the first place?