I managed to achieve my goal without CBA requirements, for future reference this is the code I used
I only needed to run it on units spawned at mission start though. It could easily be turned into a loop as you said, with a delay at the end to lower resource usage.
{if (typeOf(_x) == "classname_1" OR typeOf(_x) == "classname_2") then
{
_x addEventHandler ["Killed",
{
params ["_corpse"];
private _dummy = "#particlesource" createVehicleLocal [0,0,0];
_dummy setPosWorld getPosWorld _corpse;
_dummy say3D (selectRandom ["deathsound_1","deathsound_2"]);
}];
}
} forEach allUnits;