Is it possible to disable a theme programmatically?

here is no specialized hook for this. However the hook switch_theme should work for you.

/**
 * Switches current theme to new template and stylesheet names.
 *
 * @since unknown
 * @uses do_action() Calls 'switch_theme' action on updated theme display name.
 *
 * @param string $template Template name
 * @param string $stylesheet Stylesheet name.
 */
function switch_theme($template, $stylesheet) {
    update_option('template', $template);
    update_option('stylesheet', $stylesheet);
    delete_option('current_theme');
    $theme = get_current_theme();
    do_action('switch_theme', $theme);
}

So you should write custom function that deactivate the theme via hook and activate back, if your done with your task.

add_action('switch_theme', function($theme){
    if ( 'Your_Theme_Name' == $theme )
    {
        // do something.
    }

    // do others.

    return;
});