There are too many variables for these OT rules to determine what's the optimal route, though it probably leans towards going second. In college, it's easy as since you're guaranteed a possession each OT, you always go second to start, and there's no downside since if it's 2nd OT, you still get a chance.
The playoffs NFL rule is weird since if you do go second and match the score, the other team can win it with sudden death. So if you're the Chiefs and the Niners scored a TD on the first possession, you match them, but now it's sudden death, and SF has the ball now (would you even consider going for 2 as the ultimate ballsy move to win it right there?). But you can control your own destiny, provided you can always outscore your opponent, and you have 4 downs if they scored. If you go first, the good news is that if you can hold the other team to a matching score or lower, you now have sudden death and destiny in your hands. But the bad news is that you can't keep the other team from using all 4 downs to beat your score (unless you went wild and scored a TD and went for 2 and got it on the first possession).
Given the importance of the games that these rules apply in (NFL playoffs), I'd venture it's rare we'll see some team going first, scoring a TD, and then going for 2, or a team getting the ball second down 7, scoring a TD, and going for 2, but I'd love to see that play out, and see if any of these permutations cause a shift towards wanting the ball first or second. Maybe Dan Campbell will show us the light.