Hindsight is twenty-twenty, but Haiti by this point was a state that massacred most of its white population, run its economy to a ground (not that the Dominican Republic was in much better shape), unrecognised by France and suffered from fourteen years of civil war (1806-1820), not to mention, being different culturally. For the elite, the issue was compounded by the inevitable slave emancipation and land redistributions.
Of course, the Dominican Republic would not be able to resist Haiti invasion anyway as Haiti had larger, battle-hardened army, larger population (six hundred thousand against hundred twenty thousand of the Dominican Republic) and the foreign powers were unwilling to intervene.
First of all, it isn't completely accurate to say that Haiti massacred whites. The post-independence mass killings were targeted against white French colonists, especially males. They didn't kill Polish soldiers who had defected to join the Haitian army during revolution. They also didn't harm foreign white merchants (such as Americans and Britons). They spared some white female colonists, and also white Frenchmen who had expressed support for the blacks. The context of the massacre in Haiti after independence was a series of back-and-forth mass killings that took place in the 1 or 2 years leading up to independence. Leclerc and Rochambeau, Napoleon's generals in Saint-Domingue (Haiti) started to massacre any blacks and mulattoes they could get their hands on. This included black soldiers who were loyal to them, along with their families. I won't go into details, because it is off topic, but there were lots of mass racially-motivated killings and atrocities carried out by the French- feeding blacks to dogs, drowning them en masse in the harbor, showing mulatto women the dead bodies of their male relatives, etc. This is what inspired Dessalines' massacre- he accused the colonists of supporting the earlier mass killings of blacks and also believed they were a security threat who might support another French invasion (just like they supported Napoleon's invasion in 1802). It was like what happened in Yugoslavia in the 1990s, with different groups 'ethnically cleansing' other ethnic groups. But the main point is that the massacre of whites in Haiti was very targeted and wasn't aimed at all whites. So the white elite of what is now the Dominican Republic (DR) wasn't really the target of the Haitians' revenge.
I don't think Haiti's economy was in particularly bad shape yet in 1822. The northern part of the country was relatively well-off up until the death of its king Henri Christophe in 1820, thanks to sugar exports.
Now on to the main question: why would the white elite in DR support Haitian annexation? First of all, Haiti's 1st president, Alexandre Petion, played an important role in helping Simon Bolivar to liberate South America from Spanish rule. When Bolivar's early attempt to win independence from Spain failed, he was given refuge in Haiti and Petion provided military aid to help Bolivar go back to South America and fight for independence. If the Haitians had helped the South Americans win independence, then the Dominicans likely felt it would work for them as well.
Secondly, slavery wasn't as economically important in colonial DR as it was in colonial Haiti (or Jamaica, Brazil, Trinidad, Cuba, etc.). DR didn't have big plantations that required large numbers of slaves. Basically most slaveowners in DR wouldn't have suffered disastrous economic losses if their slaves were freed. You can make a comparison with different parts of the USA. There were slaves in Pennsylvania, but slavery wasn't very economically important. So the state voluntarily abolished slavery by the early 1800s. In somewhere like South Carolina, on the other hand, slavery was very economically important, so slaveowners there had to be defeated in the Civil War before slavery was abolished.
Third, according to historian Frank Moya Pons, the rich white slaveowners of the DR weren't necessarily the biggest supporters of Haitian annexation. The most enthusiastic supporters seem to have been slaves, who thought the Haitians would free them, and black or brown people who thought Haitian rule would bring racial equality.
Fourth, 19th century Dominican leaders had a long pattern of seeking out foreign rule. They seem to have believed that they'd be better off and safer under a strong foreign power than they would be on their own. So, some Dominicans supported Haitian annexation in 1822. Then, after winning independence from Haiti in 1844, they started looking for other countries to rule them. The main candidates were the USA, France, and Spain. At one point they almost succeeded in getting the country annexed by the USA, but, if I remember correctly, the US Congress didn't accept it. Dominican leaders put their country back under Spanish rule in the 1860s, but Spanish administrators quickly started to piss off too many people (just like the Haitian administrators had) so they revolted and regained independence.