User hardmath, provided an excellent overview of how to handle overflow when calculating the product of two functions, where one is likely to overflow: https://scicomp.stackexchange.com/a/20913/9466
The answer also discusses special cases involving $\textrm{erf}$ functions, which was discussed as an example in the question, so there is a discussion on handling $\textrm{erf}$ function underflow:
As a further precaution we will likely want to guard against underflow in evaluating $\operatorname{erfc}(x)$. The exponent range for double precision normal values goes down to binary (power of two) $-1022$. Asymptotically:
$$ \operatorname{erfc}(x) \approx O(1/x) e^{-x^2} $$
Consequently we would be at the brink of exponent underflow when $x \approx 25$.
I would like to understand how to come up with the $x \approx 25$ value. I am likely missing some math background here, so it suffices to point me to the topics that would help me understand how to come up with such estimates,