After additional testing I realized that the code that you provided me is perfect but, since I'm using the free version for testing a 40k employees salary calculation will create 480K relationships with 12 periods of 2023. the free version is limited to 400k relationships.
I'm not sure if there is a better way to design this system in order to avoid the inflation number of relationship.
best,
Avi