This:
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "epiclootchest", lTarget);
CreateItemOnObject(epicItem, GetNearestObjectByTag("epiclootchest"));
should be changed as follows:
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "epiclootchest", lTarget);
DelayCommand(0.1, CreateItemOnObject(epicItem, oSpawn) );
so as you can see I did two things. First, I eliminated your search for the created chest. You already have the reference to the created chest. Second, I added a delay before creating an item in the chest. I am not positive that this is necessary, and so suggest that you try your script without it, but I have found in many instances that an object isn't always "ready" immediately after it is created. Example, I have tried to get spawned invisibles to play sounds, but they do not play the sound unless I put that delay in there. I suspect that a spawned placeable can however receive an item in inventory, but in case it fails, I suggest you try the delay I put in there.
Also, you said your script spawns two chests, but it doesn't appear to do so from what I can see. Why do you say it creates two? Is the script executing more than once?