Available energy (Æ), which quantifies the maximum amount of thermal energy that may be liberated and converted into instabilities and turbulence, has shown to be a useful metric for predicting saturated energy fluxes in trapped-electron-mode-driven turbulence. Here, we calculate and investigate the Æ in the analytical tokamak equilibria introduced by Miller et al. (Phys. Plasmas, vol. 5, issue, 4, 1998, pp. 973–978). The Æ of trapped electrons reproduces various trends also observed in experiments; negative shear, increasing Shafranov shift, vertical elongation and negative triangularity can all be stabilising, as indicated by a reduction in Æ, although it is strongly dependent on the chosen equilibrium. Comparing Æ with saturated energy flux estimates from the TGLF (trapped gyro-Landau fluid) model, we find fairly good correspondence, showcasing that Æ can be useful to predict trends. We go on to investigate Æ and find that negative triangularity is especially beneficial in vertically elongated configurations with positive shear or low gradients. Furthermore, we extract a gradient-threshold-like quantity from Æ and find that it behaves similarly to gyrokinetic gradient thresholds: it tends to increase linearly with magnetic shear, and negative triangularity leads to an especially high threshold. We next optimise the device geometry for minimal Æ and find that the optimum is strongly dependent on equilibrium parameters, for example, magnetic shear or pressure gradient. Investigating the competing effects of increasing the density gradient, the pressure gradient, and decreasing the shear, we find regimes that have steep gradients yet low Æ, and that such a regime is inaccessible in negative-triangularity tokamaks.