The Banquet of the Chestnuts was not arranged by Guilia Farnese as it appears in the episode, but by Cesare to entertain his father. It was not done to blackmail the College of Cardinals as depicted. In fact, the male participants at the eventual orgy were not cardinals but male servants of the Pope and some invited guests. All three Borgias, Rodrigo, Cesare, and Luccrezia were present during the orgy.
Ferdinand II died in 1496, so it would have been impossible for him to witness the consummation of Lucrezia's marriage in 1498.
The Feast of the Chestnuts occurred in 1501, five years after the death of Ferdinand II although events involving the Neapolitan king and the infamous banquet are depicted as occurring consecutively.