Struggling in poor conditions at the small Principe Felipe stadium in the western Spanish region of Extremadura, Diego Simeone's Atletico were stunned on the half-hour mark when forward Alvaro Merencio gave the hosts the lead following a quick counter-attack.
Cacereno goalkeeper Diego Nieves made a string of saves to keep the 7,000 local fans' dream alive but the Spanish giants equalised in the 83rd minute when Rodrigo De Paul played in a perfect cross which Clement Lenglet headed into the back of the net.
Cacereno were reduced to 10 men after midfielder Jaime Sancho was shown a second yellow card for a tactical foul and Atletico substitute Julian Alvarez almost scored from a free kick but the referee ruled the effort out.
Atletico coach Diego Simeone was shown a straight red for his complaints about the decision but his team went ahead two minutes into added time when De Paul fired home a deflected strike and Alvarez added a third following a counter-attack.
Earlier on Thursday, Osasuna fought back to beat lowly Ceuta 3-2 but other LaLiga sides did not make the last 32.
Girona were knocked out on penalties by fourth-division Logrones on Wednesday and Villarreal were stunned by fourth-division Pontevedra 1-0 thanks to a last-gasp goal by Dalisson de Almeida.
Espanyol were eliminated on Tuesday after losing 2-0 to lowly Barbastro.
Valladolid needed extra time to beat Real Avila 4-2 while Leganes knocked out fourth-division Estepona 3-2 on penalties after a 2-2 draw.
Valencia, Real Betis, Celta Vigo, Las Palmas and Rayo Vallecano progressed with comfortable wins.
Real Madrid and Barcelona enter the competition in the next round.