What prevents an iPad or iPod charger from overcharging?

All Apple products have a charging demand circuit that senses the battery charge level and only engages charging current when the battery needs a charge.

When you plug in power to the iPad, it only initially channels enough current to run the system (or boot it up if it's off) and establish some sensing of the battery. At that point, it will start charging (and drawing more current) if needed.

If you think of electricity like water plumbing, there are two pipes - one to run the CPU/screen and another valve that only gets open when you want to send some of the water pressure into a water tower for use later. Just like a town wouldn't pump water into the tower when it's full (or when they decide they need to send all the output into town) - the iOS device isn't a simple unregulated system where the batter gets a charge whether it wants it or not.

The Dynex charger simply has a time limit so it would work normally until the 8 hour shut off finished (most iOS batteries — even old failing ones — are done charging by 4-5 hours) and at that point, rather than have your iOS device stay running on wall current, the battery would have to kick in and start self-powering the device. For that reason, I would say skip the Dynex for Apple product and save it for less sophisticated / simple electronics that don't self-govern charging current.