We could threaten the heretics with excommunication. Church law number 1364 says that formal heretics are excommunicated.
But the conditions for actually getting automatically excommunicated are stringent. They’re in canon (church) law numbers 1321-1323. For example they have to know it’s an excommunicable act to get excommunicated and they need proper use of their reason.