COVID-19 highlighted how modeling is an integral part of pandemic response. But it also exposed fundamental methodological challenges. As high-resolution data on disease progression, epidemic surveillance, and host behavior are now available, can models turn them into accurate epidemic estimates and reliable public health recommendations? Take the epidemic threshold, which estimates the potential for an infection to spread in a host population, quantifying epidemic risk throughout epidemic emergence, mitigation, and control. While models increasingly integrated realistic host contacts, no parallel development occurred with matching detail in disease progression and interventions. This narrowed the use of the epidemic threshold to oversimplified disease and control descriptions. Here, we introduce the epidemic graph diagrams (EGDs), novel representations to compute the epidemic threshold directly from arbitrarily complex data on contacts, disease and control efforts. We define a grammar of diagram operations to decompose, compare, simplify models, extracting new theoretical understanding and improving computational efficiency. We test EGDs on two public health challenges, influenza and sexually transmitted infections, to (i) explain the emergence of resistant influenza variants in the 2007-2008 season, and (ii) demonstrate that neglecting non-infectious prodromic stages biases the predicted epidemic risk, compromising control. EGDs are however general, and increase the performance of mathematical modeling to respond to present and future public health challenges.