I've always received the new V5C within two or three days of putting the number on retention.
Take the number off the car (online) two or three days before you're due to change cars. The retention document will be with you prior to trade-in and the dealer can have the new plates ready and fitted.
Your V5C should take two or three days to arrive at which time you can hand it over to the dealer.
Worst case scenario the dealer has to wait a couple of days for you to hand over the V5C.
Also note that you do have a day or two grace to put the new number on your car after taking the old one off.