latexrun does a pretty reasonable job with LaTeX files, and only runs when needed, etc. Would be nice to have this integrated into a build system for plots, data generation, etc.
I don't think that 4o will actually be available for free. It seemed like they were quite careful in choosing their words. My guess is 3.5 is free without an account, and accessing 4o requires linking your OpenAI account.
Frequencies beyond the Nyquist limit alias back to resolved modes. So a combination of the camera plus a human eye to check that the flashing is “fast” (i.e. above the Nyquist limit) should be enough to verify the frequency.