As a native English speaker and ESL tutor, I would never say "it happened" in this context. You are correct with "it occurred."
I read a post with this expression in/on this forum. At first glance it sounded OK to me but after a second look I started wondering if its usage was correct.
Is it right to say "Suddenly it happened to me that today it's my uncle's birthday and I can't forget to call him!"?
Can I use ''it happened to me'' to mean ''it occurred to me''?
"...I happened to remember that..."
"...it occurred to me that..."