Yes, other M.2 SSDs have comparable performance when swapping, and other operating systems compress memory, too — though I believe not as much as MacOS.
Although machines with Apple Silicon swap flawlessly, I worry about degrading the SSD, which is non-replaceable. So ultimately I pay for more RAM and not need swapping at all.