I really need to understand how religion works in order to see all the possibilities. I am not talking about adding religion but about modding the existing three.

I must admit I have not played much BI but I assume, from my basic understanding, the following:

Official Religion of Settlement determined by

Building with religious_belief capability, if none present then by
Governor's religion (trait), if none present then by
Faction Leader's religion (trait)

The conversion factor, modified by other factors, converts a part of the population per turn to that belief.

Population initial beliefs determined in descr_regions.txt

Unrest caused when official religion differs from majority belief of population.

There is something different about Zoroastrianism but I have not looked into this non-conversion factor.

Did I miss any important points or details?