Surface-templated covalent coupling of organic precursors currently emerges as a promising route to the atom-precise fabrication of low-dimensional carbon materials. Here, we investigate the adsorption and the coupling reactions of 4,4''-diethynyl-1,1':4',1''-terphenyl on Au(110) under ultra-high vacuum conditions by using scanning tunneling microscopy combined with density functional theory and kinetic Monte Carlo calculations. Temperature treatment induces both 1,2,4-asymmetric cyclotrimerization and homocoupling, resulting in various reaction products, including a previously unreported, surface-templated H-shaped pentamer. Our analysis of the temperature-dependent relative product abundances unravels that 1,2,4-trimerization and homocoupling proceed via identical intermediate species with the final products depending on the competition of coupling to a third monomer versus dehydrogenation. Our study sheds light on the control of coupling reactions by corrugated surfaces and annealing protocols.