ttylag wraps any command in a "shaped" PTY. No difficult piping, no tc queue disciplines required. It handles RTT, jitter, it lags in both directions and even has a --bits-per-byte flag (if you're into that sort of thing).
It's userspace-only, works on macOS and probably Linux too without any messing with network namespaces or firewall rules.