Going to Yavin IV isn't going directly for Traya (from his point of view.) Its returning to his base of operations to plan his next move and search for Traya through the Force. I see no reasons why he wouldn't go back, being on a foreign planet, the planet of his enemy, with minimal protection is not as safe as being on his own planet surrounded by hordes and hordes of Massassi warriors.
And Kun would likely be heavily overwhelmed. We're talking a max of 2 Kyramud-type battleships (each with a company of 3 Shaadlar-type troopships) against 1 Centurion-class battlecruiser and 8 possibly 10 Interdictor-class cruisers. And then we have the advantage of surprise. Kun and his fleet will drop out of hyperspace right in front of them, and Traya's fleet will open fire with everything they've got before Kun can even activate his shields. Tractor beams (they all had one equipped) will prevent Kun from moving an inch, and gravity well generators will ensure he does not escape.
Now that's a different scenario. Well, the Kyramud seems to be equal if not superior to the Centurion. The Shaadler seems to be not far behind the Interdictor (when it comes to weapon). If Kun has two Kyramud, I think his Forces would win the battle. If he has one, the battle would give him time to board the Ravager or an Interdictor and flee with it. Or to flee to the surface and hide until Ulic arrives.
There is a way how Traya could win this: Have Sion on the ship Kun boards and set it to jump into a nearby star. This would of course severely cripple her power base (Sion is alive, but he is now inside a sun and I doubt he will get away soon. The ship is destroyed.) Would Exar Kun sense that there is a trap? Would the boarding party be able to change the Hyperspace coordinates to avoid the star?
Wait, the Interdictors make it impossible to jump. So this won't work for her. If the Interdictors started to deactivate the gravity wells, Kun's fleet would notice and inform him.
So, there are two ways an ambush could work (orbital bombardment or jump to hyperspace). Both require Sion to keep Kun in place long enough, so Traya has to pick one. But not all possible decisions lead Kun into these situations. (Engaging Traya on the surface; boarding the Ravager; boarding an interdictor; engaging them in fleet battle; retreat to an unknown location on the surface. All that only if he decides to go back to Yavin and not stay on Malachor and wait for reinforcements.) Even if Kun decides to board the ship with Sion or engage Traya on the surface, it is not sure that Sion can hold him long enough for the ambush to suceed.
So all in all, the probability that the ambush for Kun will work is quite low, maybe around 10%. Traya can see the future, but that doesn't make Kun more likely to choose the choice which will make the ambush possible. Traya might see that the ambush won't suceed in advance. This will end with either her or Kun retreating from Yavin, depending on if Kun has 1 or 2 Kyramud.
But I don't want to force Kun into this confrontation. So, alternatively, lets say he does decide to remain on Malachor. What then?
Traya would send assissins, Kun will convert them to his side and send them back to either kill Traya's Sith or sabotage her ships. He will also probably learn about Sion, see that it is useless to fight him and if he ever encounters him, leave him occupied with disposable troops. He could also learn the assassins technique to gain strength with stronger opponents. Not that he would need it, of course
(But his Brotherhood of the Sith and maybe even his Massassi warriors could benefit from it.)
Then he will wait until Ulic has finished Xizor off and joins him, destroy Traya's fleet and then finish her off.
@Xizor's bio weapons: I doubt the Tetan navy will send all ships to get supplies from a dubious source at the same time. So they might have losses, but they won't be large enough to stop them. They might destroy Yavin 4 with all the Massassi. (But the Massassi could develope resistance to it.) Kun, Ulic, Traya and Sion won't be killed by them if he even manages to get them close enough to them.