  The iron-based high-$T_c$ superconductors exhibit rich phase diagrams with
intertwined phases, including magnetism, nematicity and superconductivity. The
superconducting $T_c$ in many of these materials is maximized in the regime of
strong nematic fluctuations, making the role of nematicity in influencing the
superconductivity a topic of intense research. Here, we use the AC
elastocaloric effect (ECE) to map out the phase diagram of
Ba(Fe$_{1-x}$Co$_x$)$_2$As$_2$ near optimal doping. The ECE signature at $T_c$
on the overdoped side, where superconductivity condenses without any nematic
order, is quantitatively consistent with other thermodynamic probes that
indicate a single-component superconducting state. In contrast, on the slightly
underdoped side, where superconductivity condenses within the nematic phase,
ECE reveals a second thermodynamic transition proximate to and below $T_c$. We
rule out magnetism and re-entrant tetragonality as the origin of this
transition, and find that our observations strongly suggest a phase transition
into a multicomponent superconducting state. This implies the existence of a
sub-dominant pairing instability that competes strongly with the dominant
$s^\pm$ instability. Our results thus motivate a re-examination of the pairing
state and its interplay with nematicity in this extensively studied iron-based
superconductor, while also demonstrating the power of ECE in uncovering
strain-tuned phase diagrams of quantum materials.
