Photodynamical analysis of the TOI-4504 system: Orbital precession brings planet d into transit to reveal its deeply resonant state and similarity to GJ 876 | Synapse