I might have found a clue.
Shinni pointed out that lua stores each string only once, preventing a duplicate string to be stores again. Maybe its the same with values. This would make it very memory efficient and maybe explain how certain limits come into place. It would probably mean that there is a fixed number of different keys + values (my guess: 131072) a table can have, be it strings or values.
for example:
Lua Code:
function CMX.MakeData(N,N2)
CombatMetricsFightData_Save = {}
for i = 1,N do
CombatMetricsFightData_Save[i] = {}
local logdata = CombatMetricsFightData_Save[i]
for k = 1, N2 do
logdata[k] = i.."|"..k
end
end
end
and calling it with N = 131 and N2 = 1000 leads to a corrupted file since numbers 1 to 1000 are used as keys and 131000 strings of type "i|k" are created. This means we have 132000 different elements in use causing it to fail upon recreation from file and starting to address them from the beginning again.
Calling said function with N=130 and N2 = 1000 seems to be fine (would be 131000 different keys+values)
Edit: Just saw that uesp had the same conclusion at the end. Didn't read it in detail as I already had an idea in my mind that I wanted to note down