All of my documents (macOS) are backed up to iCloud. You don't need Time Machine to do this. It happens automatically with iCloud Drive.
Admittedly, this only works for applications that use the API. For anything in plain text you should probably be using a git repo though.