Does your intermediate switch support MACSEC? If yes, then 'theoritcally' this should work but may need some tweaking to get settings properly done. If not, and device is indeed a switch, then answer is most likely will not work,ever. MACSEC is a point-to-point protocol and is not designed to support pass-through where MAC headers would change. I would fully expect the MACSEC link to not even come up - key exchange will fail.
Now if your intermediate device acted like a 'hub' then it might work. Likewise, IPSEC, would also not work in such a configuration, without IPSEC support at intermediate SW.
Good luck.