I think I might have a functionally identical 12V DC 4-relay module like the one you identify from Amazon. I got mine on eBay for less than $3 shipped. In any case, this shows how to perform the latching relay function using non-latching relays. Note that only 3 of the 4 relays on the module are used. This assumes your switch machine operates by momentarily applying the outer-rail voltage to the SwM A or SwM B terminals to fire the appropriate A or B solenoid coil.
I don't know what track system you have, but I wired up MTH Realtrax sections and a Realtrax turnout-switch. The short sections of track with white-paint labeled IA, IB, IC in the photo below are isolated outer-rails. You can't see it in the photo, but the outer rail was cut with a hacksaw to create the mini-island of outer rail for bench testing/simulation of insulated-rail triggering.
And here it is in action!
What I tried to show is the elegance of the latching relay. That is, you can have "dirty" track with intermittent trigger contacts and resulting multiple triggers - the latching function cleans this all up.