How do I optimise expedition and gym output?

Gym/Training

For starters, there is a node on the skill tree at the far bottom left called Activities ↑. It "increases Gym and Dojo efficiency, and increases loot in Explore." So it is a no-brainer to go for this node first to fully impact all your expeditions and gym outputs onward.

enter image description here

For gym training, it is definitely important to slot fighters that have the red upwards icon to the right of their cards. As you can see here, the Bandana Waddle Dee has the bonus icon next to its name, and from experience it definitely levels faster than spirits with the negative icon:

enter image description here

Expeditions

As for expeditions, it seems from personal testing that there are only two things that factor into loot: the rank of the spirit (# of stars), and whether or not said spirit has positive bonuses to the expedition. Here's two screenshots of two expeditions I made with Toadette's expedition. The first consisted of all 1-star rank spirits:

enter image description here

And the second consisted of all Legend (4-star rank) spirits:

enter image description here

Extensive testing showed that level factors seemingly little into the final result. As you can see the difference between the 1-star and 4-star expedition was nearly DOUBLE.

So to sum it up?

[4-Star Rank + Positive Boost] > [4-Star Rank] > [Positive Boost]