I'm doing a 3D camera track on some footage, but my error margin stays on 0.3. My guess is the camera operator changes the focal distance while shooting. Does blender take this into account when solving? I refine the focus, k1, k2, focal length, Optical Center when I calculate the solve, but does it animate the focus in the scene?
If your error average is indeed 0.3 you have a decent track.
Now, to your question:
Currently blender can only work with footage with a that has no variations in focal length or zoom changes.
Changes in focus distance, as in when using a fixed focal length there is a focus rack, might present problems as well. Depending on the lens, there might be some distortion called "breathing" (see this link for an example). When a lens "breaths" it means that there is indeed a change in the angle of coverage of the image when the lens is focusing to a close distance or to infinity.
Breathing is common in wide angle lenses and in zoom lenses that are not designed for motion pictures.
If the angle of coverage of the lens changes, blender cannot currently compensate for it.