One thing that really hurt the Whigs were their bad luck on Presidential candidates (or perhaps vice presidential candidates) once they were elected. Both Harrison and Taylor died in office, and their VPs that assumed the office (Tyler and Fillmore) were just abysmal. It harmed the reputation of the party and completely prevented them from achieving their aims. If the Whigs had proven more successful earlier, perhaps they might have been able to weather the storm over slavery.
Let's say Harrison lives throughout his term, or that someone other than Tyler became VP. Or perhaps Clay was the nominee and Harrison the VP. Anything could work. Instead of the mess that happened, the Whigs actually have a successful presidency during those years and then have a good chance of passing their legislative priorities. That would put them in good place in 1844 even with the Texas annexation issue. Even if they lose, we know the Whigs can still win elections - they just need their war hero nominee to live, or once again have a better VP. While we may just have the Whig victories of OTL (1840 and 1848), it is possible that the Whigs might control the presidency from 1840-1856 and achieve their major aims.
This would make the Whigs a more successful party, and thus inspire more loyalty to it as an institution because they know the party can win elections.
The rancor of the slavery issue cannot be escaped. It did destroy the Whigs, but it almost destroyed the Democrats too. I don't think it is possible for the Whigs to not be disrupted, but perhaps the rupture does not lead to the end of the party. Instead, just like how the Democrats splits and nominated a pro-slavery candidate and a more moderate candidate; eventually the Whigs split into an anti-slavery party (instead of the Republicans forming, these people become the dominant whigs) and a more moderate candidate (like Bell as a Constitutional Unionist). For the same reasons that had the Republicans win in 1860, the anti-slavery Whigs win. And history goes on much as we know it. Eventually (many) of the southern Whigs come back to the party after a civil war, or perhaps just a secessionist crisis that is peacefully resolved.