Mexico had abolished slavery a generation before and as mentioned before telling millions of Indio peon farmers working essentially as medieval serfs that they'd now be slaves under American law likely revives the same warriors that threw out the Spanish Empire 30 years before after 300 years. Coming to an accommodation with a mostly Indio/Mestizo population with hard won rights seems more likely to collapse Negro slavery in the U.S. (which was modeled on Indio slavery in the Carribbean sugar plantations anyway) or greatly constrain it rather than spread it.
Cuba would a much easier integration at that time but the wealth of it's own sugar exports would more likely mean a Spanish Empire/Frontier America war at this time with Spain far stronger and comparable than in 1898. Helping the Cubans throw out the Spanish is a much different proposition than a weak neighbor with a long history of dispossessing anyone else from established farms, plantations, towns, etc., just like the Phillipine Insurrection. Probably would come in as a slave state but one in chaos.
Seizing and holding that much more of Mexico during the Mexican-American War does seem viable given what was actually accomplished and after the invasion of Mexico City. Probably no Gadsden Purchase/reparations so those funds could develop the new territories which include a lot of mining by the late 19th century so silver rushes probably add a lot of American/European population and investment as well as drive both a Southern route transcontinental railroad in the 1850's and lots of short lines to the mines, ports, etc. as it did in the U.S. but not as much in Mexico with centrally-controlled rail development. That'd do a lot for the population from raising ag prices, dropping the price of manufactured goods from distant cities/ports, encouraging manufacturing, improving bridges and roads considerably, booming some places like Ciudad Juarez, Tampico, Matamoros, Vera Cruz, Acapulco, etc. that'd end up following much the same path as Arizona, New Mexico, and Colorado. Along with mining, this grabs much of Mexico's most accessible petroleum deposits and a lot of timber and cattle pasturage, 20th Century Mexico would be far poorer because of that loss (oil is 40% of the federal revenues now) but a lot easier to coherently govern and administer (governors would have far less power.)
If the American Civil War did take place, and I think this scenario greatly diffuses that risk, the Union Naval blockade would be stretched too thin with the thousands of additional miles of Atlantic and Pacific coastline if Confederate or taking the apparent opportunity to secede themselves as a new country no longer beholden to Madrid, Mexico City, or Washington D.C....Utah would likely too and so many fronts would likely bring a negotiated secession instead of 10 years of war everywhere.
It's easy to underestimate Mexico and Spain then and overestimate what the U.S. had before the coming build up.