The JOIN between employments and employers is the culprit. I'm unable to get rid of the seq scan, and setting enable_seqscan to off makes things even worse.
Is there any way to get rid of this JOIN?
Have you got an index on employments.employer_id? It seems for me that only some employments get out of join, so index would help here. What's the plan with seq_scan off?
P.S. I don't see why all employments are needed. May be I am reading something wrong? For me it's max 2616 employments out of 1606432.