Writing has only been invented independently a few times in history, so it seems reasonable that cuneiform could be the first.
Why do we not see more writing in the archeological record? Maybe agrarian societies both motivate writing and are required to provide the free time to invent it? Or perhaps it was written on media that's subject to decay? If some society developed writing on tree bark 100,000 years ago, none of that is going to survive and we'd never know.
There was prehistoric (i.e. pre-writing) trade between Sumer and Egypt. Scholars have argued that the idea of writing based on the rebus principle—but not a specific writing system—may have been communicated one way or another through this trade contact.
Your claim that the cultures were "very strongly linked with near identical cultic symbols and building plans for temples" is a new one for me—and I volunteer at a museum of ancient near eastern archeology. The material culture of pre-Dynastic Egypt and Sumer are rather distinct from each other. And when we do get writing describing their religion, those are also rather distinct from each other.
Much like fossils, the vast majority of human writing is quickly lost to posterity. Paper, bark, and string decompose; clay and rock break; all writing materials can be repurposed for other writing (palimpsets) or other uses (reshaped to wall stones).
Still, given the paucity of known, independently invented writing systems... We may well know of all of them.