But what did that mean in the context of 1787? What was the spirit of the law?
It is not really open to interpretation. A person’s religion can not bar them from office, period.
However, Americans have the right to VOTE or NOT VOTE for candidates based upon their religious beliefs and no American should ever vote for a Muslim for anything.
I think the wording is quite clear. What is there to not understand?