Do lower court judges time their decisions to take senior status or retire, and thus create a vacancy for a President to fill, based upon who they think might replace them? It is an interesting (and timely) question--and one that can be informed by more than anecdote and intuition.
Back in 1995, James F. Spriggs, II and Paul J. Wahlbeck published a paper looking at lower court retirement decisions between 1893 and 1991, "Calling It Quits: Strategic Retirement on the Federal Courts of Appeals, 1893-1991." Perhaps unsurprisingly, they found that retirement rates increased significantly among judges appointed by a President of the same party as the current occupant of the White House. Other studies, including "Judges as Party Animals: Retirement Timing by Federal Judges and Party Control of Judicial Appointments" by Ross M. Stolzenberg and James Lindgren have reached similar conclusions.
More recently, John Deschler and Maya Sen looked at whether ideology, distinct from partisan affiliation, influences judges' decisions to leave active status. Their paper, "The Role of Judge Ideology in Strategic Retirements in U.S. Federal Courts," published last year, suggests it does. Here's the abstract: