It is a short personal story. (which is usually amusing).
Even though Swift is not suggesting that the rich people in Ireland start eating the babies of the poor, he is still suggesting some realistic solutions. Most of all he is pointing out that the rich need to start doing something to balance out the economy and support the lower classes, instead of treating them like cattle. Comparing them to cattle by suggesting they eat babies points out this flaw of society and that it needs to be changed.
He asked Harry if he knew what “powdered root of asphodel” and “infusion of wormwood” make together. Harry said he didn’t know and snape was like “clearly fame isn’t everything.” So he basically asked him a question he knew harry wouldn’t know to embarrass him.