How does the DH algorithm deal with enormous powers?
It doesn't. The mod operation does not have to be performed after exponentiation. Modular exponentiation can be implemented using modular multiplication (and modular addition). Modular multiplication in turn can be implemented relatively efficiently, for instance using a Montgomery multiplier.

Here's an example using decimals instead of binary; you know that $323 \times 323$ ends with a $9$ even without doing the full computation. This is a $\bmod 10$ operation. In the same way, you know that $323^3$ ends with a $7$ because $323 \times 323 \times 323$ ends with a $7$.