Mocking the kaafirs for their kufr or the innovators for their innovations (bid’ah) is permissible because they enjoy no sanctity or protection with regard to their sin and evildoing in which they regard as permissible that which Allaah and Islam have forbidden. But this is only so long as the mocking does not go beyond the framework of dignity and truth, and it is not taken as a usual habit, and the jokes do not outweigh one's seriousness. But what we are warning against has become the habit of many people.
If one is to mock them, it should be for their going against the Sunnah, not for their different ways of dressing, walking, etc.
But is it a sin?
The correct view is that it is not a sin, rather this is something that it is permissible to talk about and joke about. The fact that the sin that we are mocking does not constitute kufr that puts a person beyond the pale of Islam makes it even more appropriate to joke about their sin, because by forsaking the truth and following falsehood, they have mocked the sanctity of Allaah.
Al-Laalkaani narrated, with isnaads, some reports from some of the salaf concerning such cases:
-He narrated from al-A’mash that Ibraaheem said: “There is no gheebah [backbiting] concerning one who follows bid’ah.”
-He narrated that al-Hasan al-Basri said: “There are three who have no protection from gheebah, one of whom is the one who follows bid’ah and is extreme in his bid’ah.”
-He narrated from Hishaam that al-Hasan said: “There is no gheebah in the case of one who follows bid’ah and one who commits evil.”
-He narrated that al-Hasan said: “There is no gheebah in the case of the people of bid’ah.”
-He narrated that Katheer Abu Sahl said: “It is said that there is no sanctity for the people who follow their whims and desires.”
(I’tiqaad Ahl al-Sunnah, 1/140).
The example which is mentioned in the question, which is, “Oh, we don’t have to pray, it’s in your heart, remember?” is not kufr because the one who says it does not intend to mock the prayer, rather he intends to mock these words that go against sharee’ah, and to show that they are false.
The point is that making fun of something that the innovators say is not haraam and does not constitute kufr.
But we do not encourage denouncing the innovators by mocking them; rather we should debate with them in the way that is best. Your concern when debating with them should be to guide them to the Straight Path. Allaah said to Moosa and Haroon when He sent them to Pharaoh (interpretation of the meaning):
“And speak to him mildly, perhaps he may accept admonition or fear (Allaah)”
And Allaah knows best.