Question: If a person who gave wrong teachings that harmed many in the name of ‘Buddhism’ passes away, can merits dedicated to this person prevent falling into hell?
Answer: This is not easy — [1] if the person was deluded and arrogant despite advice, unrepentant before rebirth, and did not practise the Right Dharma in time, [2] if the wrong teachings were not rectified to those who received them, and [3] if the wrong teachings continue to harm many.
To avoid hell, the merits generated on behalf of the person must be more than the evil karma personally created, and be more than the evil karma still being created indirectly from the remaining teachings. However, even if in hell, merits dedicated can still lessen the suffering there.