Over time, ancient wooden structures undergo challenges in structural integrity and stability, influenced by various environmental conditions such as temperature fluctuations and humidity variations. Maintenance and protection of this invaluable architectural heritage require precise performance predictions and optimisations. While existing research has delved deeply into performance prediction of wooden structures, it predominantly focuses on empirical observations and experimental analyses, with minimal establishment and validation of theoretical models. Moreover, extant methods for prediction and optimisation often overlook the strain variation of wood under different temperatures and the stochastic nature of environmental factors. This study seeks to address this research gap by investigating the relationship between strain in the grain direction of ancient wooden beams and temperature, and by formulating a comprehensive thermodynamic model. Additionally, a novel optimisation approach using the chicken swarm optimisation (CSO) algorithm has been introduced to further refine performance parameters of wooden structures. By integrating the theoretical model with the CSO, this research offers a novel perspective and methodology for the prediction and optimisation of the long-term performance of wooden structures.