There are some models that are harder to get to TorchScript than others but yes, that approach is very general for anything only needing Tensor, number, and/or string input.
Going to C++ fully (without the JIT) is likely only worth it if you don’t have a Python model or have reasons not to compile in the JIT.
There is some ongoing work to make a static runtime for inference: [JIT][Static Runtime] Memory optimization for output tensors · Issue #53867 · pytorch/pytorch · GitHub this could be of interest if it is applicable for your usecase.