How to change which modules are auto-applied in Darktable?

Automatic presets would do that, see the section “Module presets” in Darktable’s user manual. Note that you need Darktable version > 1.4 for this to work sensibly with lens correction. In earlier versions the lens correction did not adapt correctly to the image parameters.

Relevant section from the manual:

A module has an expander bar expander bar screenshot for the Sharpen module. Clicking on the name of the module
expands the module’s GUI with all parameters.

In its default setting darktable will only expand one GUI at a time.
If you click the expander bar of another module, the previous GUI gets
collapsed. If you want to see more than one GUI expanded, you may
expand further modules with shift-click – all previously expanded
GUIs remain opened. The expander bar behavior on click and
shift-click, respectively, is controlled by a preference setting in
gui options (see Section 8.1, “GUI options”).

Expanding a module does not activate it. You need to click the screenshot of the on/off icon from the expander bar icon
to turn a module on or off.

Icon hamburger menu from the expander bar accesses the module’s available presets or creates a new preset
from your current settings (see Section 3.2.3, “Module presets”).