"Once" is used here to add emphasis to the negative meaning of "never." In particular, it means that "the act of thinking of ...." did not occur, not even once. We could also rewrite the phrase as "not even once did I think of" or "not even for one moment did I think of...."
"I never ever thought of..." has the same meaning, with "ever" being used here for emphasis, just like "once" above. At least for me, there is no difference in nuance between the two, so you could say either phrase, depending on your personal preference.
I hope this helps!