Seeing his chances of reelection slipping away, the president wants his armada of lawyers to give Democrats a court fight that ‘they’ll never forget’