I haven't seen too many pvc
parts that don't fit together. In the first picture I would use some teflon tape, and not glue. I like to use this-
Plasto-Joint Stick Thread Sealant 1.25oz 11775: Amazon.com: Industrial & Scientific
On all my threads. It is inert, so no harm to livestock, and you can unscrew your plumbing as much as you want and it will still seal. It can be a bit messy though.
In the second picture, what do you mean by emergency flow? Is this a drain or return? If it's a drain, it doesn't matter if it's not a tight fit. Water pressure will hold it in. If it's a return, I would swap the bottom and top bulkheads and sand it a bit like you were suggesting until it fits snug.