My experience in federal court is just the opposite. The best plea deals (in non-complex cases) are struck before the case makes its way out of the magistrate's courtroom. The reason is simple: the earlier a deal is struck, the less work the US Attorney will have to do on the case.
But, as the other attorney said, there really is no "yes" or "no" answer on this. It's quite subjective.
It is sometimes, but by no means always, true in state court. It is seldom if every true in federal court. I agree with my colleague that in federal court the plea agreements are generally less favorable to the defendant as time goes on.
Because a lot of cases that end up being heard in Federal Court could also have been brought in State Court (concurrent jurisdiction), the Federal prosecutors (AUSAs) tend to pick the cases that they think they can win. This is why you see so many Felon In Possession of a Firearm and Illegal Re-entry cases at the Federal Level. AUSAs are generally all about their conviction rate. If they can achieve a 99% conviction rate (even by only taking easy cases), they go far in their careers.
As such, the Federal pretrial process is VERY different than at the state level. I would say that generally the defense has less power, the prosecution has more time to prepare and that this weighs against the statement you made. While I have achieved great outcomes for clients at the state level by moving closer to the trial date, I've seen the opposite more often at the Federal level. There's even a "fast track" system in place that benefits those who plead guilty early.
I'm not suggesting you plead. Speak to your attorney and every case is different, but I would say that the idea that deals get better as time goes on, while maybe true in State court, generally does not hold true at the Federal level.