Currently I'm running this code to reset all stacked eventhandlers on player join/leave:
{
_event = _x;
_namespaceId = "BIS_stackedEventHandlers_";
_namespaceEvent = _namespaceId + _event;
_data = missionNameSpace getVariable [_namespaceEvent, []];
{
private "_itemId";
_itemId = [_x, 0, "", [""]] call BIS_fnc_param;
[_itemId,_event] call bis_fnc_removeStackedEventHandler;
} forEach _data;
} forEach ["oneachframe", "onpreloadstarted", "onpreloadfinished", "onmapsingleclick", "onplayerconnected", "onplayerdisconnected"];