Motivated by the notion that the mathematics of gravity can be reproduced from a statistical requirement of maximal entropy, the consequences of introducing an entropic source term in the Einstein–Hilbert action are studied. For a spatially homogeneous cosmological system driven by this entropic source and enveloped by a time‐evolving apparent horizon, a modified version of the second law of thermodynamics is formulated. An explicit differential equation governing the internal entropy profile is found. Using a Hessian matrix analysis of the internal entropy, the author checked the thermodynamic stability for three categorically different toy models describing (i) a cosmology, (ii) a unified cosmic expanson, and (iii) a non‐singular ekpyrotic bounce. The mathematical condition for a second order phase transition during these evolutions from the divergence of specific heat at constant volume is found. The new‐found condition is purely kinematic and quadratic in nature, relating the deceleration parameter and the jerk parameter that chalks out an interesting curve on the parameter space. This condition is valid even without the entropic source term and may be treated as a general property of any phase transition.