I just started re-watching the highly enjoyable film La Batalla: Cinco de Mayo, about the French intervention in Mexico (culminating with the Battle of Puebla).
There's a scene early on depicting a conversation between Juan Almonte and others from the conservative Mexican side and Napoleon III. I've of course no doubt that some or all of this is dramatized, but I was curious about one aspect in particular. Specifically, at one point Napoleon III says that Benito Juárez's decision to stop payments on Mexico's foreign debt is a "perfect excuse" to send troops. One of his true motivations, he says, is to be in a position to give military aid to the Confederate States (he tells the Count of Lorencez to lead troops north after subjugating Mexico). Other things he says suggest that his hope was to leave the U.S. divided and thus weaker (rather than necessarily supporting the CSA in and of itself).
I didn't think the United States was really regarded as a player on the international scene (at least militarily) until well after the Civil War, and so it seemed a little strange to me that the status of the U.S. would really play such a role in French strategic thinking. That being said, I can see that being a nice bonus if the main objective (Mexico) were taken care of.
So, how much did supporting the CSA actually play a role in his decision to intervene militarily in Mexico?
Probably none at all. Napoleon III saw the CSA as more of a means to an end, a diversion for Washington that would allow him a chance to assert French Interests in Mexico. It was never his primary reason to militarily intervene in Mexico, he had decided on those objectives long before the CSA was formed. (his wife, Eugenie, had been pushing the idea of military intervention in Mexico to set up a European monarch as early as 1860)
Like many European leaders of the day, Napoleon believed that the civil war would end in victory for the south, or at least a stalemate which would result in the division of the United States. Which would leave it too weak to challenge French incursions into their hemisphere. Seeing that as a foregone conclusion, military aid to the CSA hardly factored into his calculations.
Napoleon also understood that it would have been logistically difficult to militarily support the CSA. The French army by that time was already spread thin in other commitments around the globe, with 70,000 troops in North Africa and 30,000 in Rome (along with a further 40,000 in Mexico). Any form of support Napoleon could have given would have just been breaking the American blockade but that would require formally going to war, something that the French could hardly afford with its troops fighting a war already in Mexico.
As for the United States playing a part in strategic thinking. Although not an international power, the US at this time was still recognized as a growing power. And the Monroe doctrine of non-intervention in the western hemisphere made European powers wary of spreading further into North America. Although still not quite a powerhouse, no European power was foolish enough to risk a war with the United States in its own backyard.