Calendar reminders don't always work

I have had 3 different phones until now where calendar alarms sometimes worked and sometimes don't. The devices are an Asus Zenfone Max with Android 6, Asus Zenfone 3 Zoom with Android 6 and Galaxy S7 Edge with Android 7. When the failure happens, there is no sound, neither notification. The phone does nothing although the alarm is properly set. Also I always use the built-in calendar application but the other applications have the same problem so the failure is in the operating system itself. As the failure has happened with 3 different models of 2 different brands, I don't know what to do now, as if I keep spending money in buying new phones, probably the same failure will happen to me if I don't know what am I buying. I think the failure could even be inside Android. With the version 5 and older ones I had never had such problem. It started with 6 and continued with 7. Don't know if it is related to Doze feature. It is supposed to not affect built-in clock or calendar, but it does for me.

What's the solution?