Anti-American sentiment is not going to make the Mexicans welcome a de facto French occupation or a monarchy with open arms.
Although Mexican-American relations played a huge role in shaping Mexican history, Mexican history does not revolve around tensions with the United States. Maximillian received some support from within Mexico but by an large the population opposed him. Mexican public opinion mostly favored republicanism and most Mexicans rightly saw Maximillian as a puppet of French imperialists. Mexico had already successfully rebelled against monarchy and Maximillian meant a return to that.
That does,
depend on the manner of American intervention. Under no circumstances would Juarez accept an official American army on Mexican soil. The memories of the US invasion were too fresh and too bitter, and would probably have seen even devoted Republicans desert him because even Liberals and Conservatives had briefly set aside their differences to fight the US invasion of the 1840s. It really can't be understated how much of a national humiliation it was seen in Mexico and that such an intervention would probably be a godsend for Maximillian because even the threat of the US exacting concessions for it's involvement would be an enormous political problem for Juarez.
Historically the diplomatic pressure placed on France (and the US army just
happening to lose thousands of rifles and crates of ammunition along the Rio Grande) was enough to topple Maximillian.
The domestic opposition to Maximillian is less clear cut than that. Max was, personally, probably very popular with many Mexicans because he bothered to treat them well, attempted to reign in corrupt officials, and worked hard to get decent relations with the Native peoples who provided support to his regime, and he was not an absolute monarchist. He royally screwed the pooch with the Black Decree of October 1865 because just as he was winning on a military level, he alienated numerous people who now faced a literal death sentence if he won, and truthfully, absent that, his carrot and stick style conservatism had failed to alienate the masses of Mexico. However this, coupled with the French decision to begin to withdraw French troops beginning in 1866, effectively doomed him.
That said, a naval mission to clear French warships from the Gulf of Mexico and Veracruz coupled with the historic "loss" of weapons along the Rio Grande would be all that would be needed to simultaneously put the fear of God into Napoleon and allow Juarez to win as he did historically.
Winning a naval struggle against the French (and effectively a very cheap war) would be a huge post Civil War boon to the national pysche that the US is now a
player on the world stage. It would probably still have a larger army, larger navy, and the feeling of being able to make it's voice heard while showing that the Monroe Doctrine is not just a piece of paper enforced by the British as it had largely been perceived.