for complicated stuff involving multiple threads and shared memory, it's good to plan it out in advance in some way. but you are right that most data can just get stack allocated
if you look at their code it's like they have no clue that the stack even exists. seriously. they heap allocate EVERYTHING