I believe `script` should be present on roughly all Linux systems. (On Arch Linux, /usr/bin/script is part of the util-linux package, which is a dependency of such illustrious packages as base and systemd.)
It produces a file containing just what got sent to the terminal, no timing information. -T lets it output timing info but as a separate file.
(Also in this vein, the ttyrec format is a binary format that interleaves timing and terminal output. It’s very similar in function to the asciicast v2 format, but much more compact by dint of being binary rather than JSON, and asciicast v2 has a few extra features like being able to declare the duration in the header, record environment variables, record the colour palette, and add markers. I wish asciinema had built on the ttyrec format at least for its canonical format (like WASM has the binary and text formats), and asciicast v1 was bad in a few ways, but from asciicast v2 it’s much more reasonable, and maybe when I eventually get round to doing terminal recordings again I’ll use asciinema this time instead of termrec + my own <tty-player> element, as seen on https://chrismorgan.info/blog/make-and-git-diff-test-harness....)
There's probably a better way to do this, but I don't know what it is.