Linear power supply + zero-crossing detection on transformer secondary
Realize the zero crossing first without transformer. Separate optical.
See this old elektor design. The value of C1 is crucial. The received puls can be send to the micro processor. I have realized this circuit many times and it works without a flaw.

A short quote from the old Elektor magazine:
Due to reactive, non-uniform loads, zero crossing points can be exactly determined on the secondary side of the transformer only under certain conditions. The non-linear transfer characteristic often causes the secondary voltage to be deformed and offset in phase, so it cannot be assumed to be a clean, phase-aligned sine-wave signal.