However changing the web.config or registry values broke the CRM. When we tried adding an activity, it threw the plug-in execution failed error written above.
Possible solutions on the other blogs were
1. Running a repair installation of CRM and reconfiguring the service accounts.
2. Removing the plugin solution that's causing this error.
However, In our case, it was the following:
1. Undo the changes to the web.config and delete the registry key added earlier.
3. Restart the Sandbox processing service
That fixed our problem, and CRM started functioning normally.