Optimisation of a three-terminal nonlinear heat nano-engine