That is just adding code to the module's OnPlayerEquipItem event. Check to see if heavy armor is in the armor slot. If so, copy the armor to the PC's inventory and destroy the equipped armor.
You may want to reconsider that. What about multiclass clerics? I mean shouldn't a Cleric/Fighter be able to wear heavy armor? What if your Cleric picks up the Heavy Armor Prof feat themselves? That kind of script would keep them out of it no matter what.
I still think the best solution is to remove the feat on entering the gameworld. Either through Letoscripting, or I believe nwnx_funcs has a RemoveFeat function.
Basically script a module on enter, or an area on enter for the starting area of your module, however you prefer. Check their class, and if it's cleric remove the feat.
You'd also want to do a Module LevelUp script that checks to see if the person is taking a level in cleric, and if they already have Heavy Armor Prof. If they already have Heavy Armor Prof... no problem, just end it there and don't remove it. If they are taking cleric for the first time, and they don't have the heavy armor prof feat, then it is taken away.
I'm no where near qualified to give exact instructions on Letoscripting, or much of NWNX for that matter. But since your using it... you might as well abuse it.