It's a combination of both. They have tools that help worth the trajectory calculations, but they have to manually decide on the basic layout of the path to take.
There is a very interesting interview with Pablo Munoz from the Bepi Colombo team about flight dynamics on the Omega Tau podcast that explains this: http://omegataupodcast.net/295-bepicolombo/
The other interviews on the same episode are also worth listening to. In fact, the entire podcast is great.