Both the Tunisian and the Moroccan clubs will advance directly to the last-32 of competition.
Esperance will play Cercle Mberi Sportif of Gabon or Elect-Sport of Chad while Wydad have been drawn against the winner of SO Armee of the Ivory Coast and Nouadhibou of Mauritania during September.
Two months ago, Esperance were leading Wydad 2-1 on aggregate with 30 minutes remaining of the second leg in Tunis when Wydad had an equaliser disallowed.
Wydad wanted the decision referred to VAR (video assistant referee), but the system was not working and the team stormed off in protest.
After a 90-minute delay, Esperance were awarded the match and the team received medals and the trophy, but not the 2.24 mn euros prize.
When CAF officials later ordered the second leg to be replayed at a neutral venue, both clubs lodged appeals with the Court of Arbitration for Sport (CAS).