Yep ancient civilizations have thought about these concepts for a long time. Some got destroyed by floods, some by famine, but horrific destruction have happened when Abrahmic religions came on the scene with "holier than thou" philosophy which made destruction of others a religious duty.
Hindus were obsessed with zero and infinity and to them it was the same as god itself. Shanti mantra(used to wish well to all living being) from īśopaniṣad says.
> ओं | पूर्णमदः पूर्णमिदं पूर्णात्पूर्णमुदच्यते ।
पूर्णस्य पूर्णमादाय पूर्णमेवावशिष्यते ॥
> oṃ | pūrṇamadaḥ pūrṇamidaṃ pūrṇātpūrṇamudacyate |
pūrṇasya pūrṇamādāya pūrṇamevāvaśiṣyate ||
> That is Whole and this is Whole, the perfect has come out of the perfect; having taken the perfect from the perfect, only the perfect remains. Let there be Peace, Peace, Peace.
Verse above describes God superficially but it also describes zero and infinity[0]. This small text with only 18 verses and yet it is so profound. Similarly Buddhist philosophy which also came out from India is based on Shunya(zero).
[0] https://en.wikipedia.org/wiki/Isha_Upanishad