generally speaking i think if you set syncrefresh, waitvsync and triplebuffer all to 0, then groovymame chooses the most suitable option for you.
That's correct. In GroovyMAME, for these options, as well as for cleanstretch, "0" in mame.ini means automatic.
Switchres in GM sets options with higher priority than mame.ini, so if these options are "0" in mame.ini GM will be able to override them to make the best adjustment depending on the resulting refresh from the modeline generator (which is a function of your monitor configuration).
If you want to force a specific setting then you put it in an .ini file with higher priority than Switchres (all but mame.ini: game.ini, driver.ini, etc.)
You can see what settings are being applied by creating a log.
For -triplebuffer (Windows) to actually work as intended, -multithreading must be enabled first in mame.ini. This must be done manually as it is disabled by default for stability reasons (mainly because it caused issues for people using super invasive frontends that kill the emulator process by hooking the escape key and things like that).
For games that run at 30 Hz, in normal conditions (default options in mame.ini), -triplebuffer would be invoked by GM keeping the speed at 100% without requiring -frame_delay.