Graphite will work to keep the threads lubricated, but won't help much if there is damage. Filters can stick for a few reasons - damaged threads, warping, dirt, etc - and can be on either the male or female threads. As the filter itself is rather week, structurally, the more force exerted when trying to remove, the more the filter housing warps. That makes the filter even harder it is to remove, so more force is exerted, which makes it stick even more, and so on.... That warping is why the problem is worse when dealing with filter on filter as opposed to a filter directly on a lens.
Eventually, the filter body is so out of round, or the threads so damage, it's almost unusable. No amount of graphite will help much once that happens.
I would recommend trying one of those very inexpensive plastic filter wrenches as they provide EVEN pressure around the filter and make removing even stubborn filters very easy. When a filter sticks, there's nothing better.
filter wrench.....$4.95US