In general, however, it's much better to measure/sense physical phenomenon by first converting it into frequency, because it is much easier to measure frequency precisely. Using something like a TCXO from Seiko Epson with 1 ppm tolerance, and measuring over time, you can easily achieve 0.00001% precision and beyond. I know that strain gauges used in civil engineering often utilize this concept, where a metal string is "plucked" electronically and the frequency is then measured.
[0] https://www.vishay.com/docs/61010/ccc.pdf and https://foilresistors.com/docs/63120/hzseries.pdf
If I call correctly, TAoE said engineering calculations should never keep too many significant digits, since no real-world components are that accurate, and all good designs should keep component tolerance in mind - they should not have an unrealistic expectation of precision. It also mentioned that designing a circuit for absolute worst-case tolerance is often a waste of time.
But I don't think TAoE told you to "avoid precision components in your design, use trimmers instead" (Do you have a page number?) when the application calls for it. For example, 0.1% feedback resistors in precision voltage references are often reasonable.
> For high precision one can use trim potentiometers
From what I've read (from other sources), mechanical trimmer used to be extremely popular, but they went out of favor in recent decades because tuning could not be automated and that increased assembly cost. Using a 0.1% resistor is favorable if it allows trim-free production.
> or maybe even digital potentiometer with an ADC at the other side to measure and get as close as possible
Yes, digital trimming and calibrations is today's go-to solution.
Also, component-level precision has limits because eventually trace impedance starts to be significant (hence the use of trim components you mentioned!).
Youtuber Marco Reps goes through various high precision equipment that often have precision resistors and such, recommended if interested!