AFAIK the people that do this have specific versions of smart devices like Roku or Chromecast attached to splitters that ignore the copy protection and then pass the HDMI signal to a hardware HD recorder. Even then, at best, they are recording the decompressed signal that is re-encoded on capture.
It likely isn’t cheap, isn’t easy, won’t get you fully lossless recordings, and possibly outside of site rules to discuss in detail.