The Stanford S4 code is a good example of a free/open-source C++ RCWA scattering-matrix package. Its author wrote a short review of S-matrix calculations via Redheffer products, and one of my students put some more references in the Redheffer-product Wikipedia article — the technique is totally standard and accepted.
grcwa is a nice AD-compatible RCWA package in Python.
The advantages of Redheffer scattering-matrix methods over transfer matrices have been known for many decades now. S-matrix formulations have always been essential for RCWA methods, because as soon as you have finite-period unit cells you have lots of evanescent modes and transfer matrices quickly become a disaster. You can get away with transfer matrices for the simpler case of planar multilayer-film systems (or for more complicated structures if they are thin), and they are much simpler to explain and popular in textbooks, so you still see people using them — but they are terrible as soon as you start going to lots of layers, especially if you study photonic-bandgap systems. (I’ve seen people who didn’t know better resorting to arbitrary-precision transfer-matrix calculations in Mathematica to get around the ill-conditioning!) I think it’s pretty well known among computational-photonics people that S matrices fix these problems, but it hasn’t penetrated into the introductory pedagogy.
(IIRC, transfer matrices are okay as long as you don’t have any fields that decay by more than 1e-8 or so across your whole structure. After that point, the ill-conditioning starts to get so bad that you get noticably inaccurate results even in double precision, and eventually you get complete garbage. Unfortunately, for thick multilayer structures there are lots of situations in which you get enormous exponential attenuation.)
Physically, scattering matrices (which give you transmission and reflection coefficients), are usually what people want to compute at the end of the day. You can get them from the transfer matrices, but the problem is that if the transfer matrix is ill-conditioned then the resulting scattering matrix can be very inaccurate. It’s much better to build up the scattering matrix layer by layer using Redheffer products (although authors don’t always call it that — the same machinery seems to have been rediscovered independently multiple times since Redheffer in 1959).