What you show (switch based trim) is what I've done many
times. You can put switches across series elements as well
and lower the impact of D-S leakage (as Vds on each, will be
small) and have a more code-linear trimming. Drive switches
with 2s-complement code (a small translation block) and you
can a make-to-center, trim up or down trim that makes an
untrimmed part come out roughly-right before any trim is
done (handy, at probe).
Beware the lumped capacitive loading of many parallel large
switches attached to a high-ish-Z node.