The evolution of coronal mass ejections in the inner heliosphere: Implementing the spheromak model with EUHFORIA