You can change the params of a component with an added plugin as you did. I would only change the sequence of the conditional statement of yours like:
if (JFactory::getApplication()->input->get('option') == 'com_abc') {...}
That's not that relevant change, it just looks a bit more logical to me. And if you want to be a little more precise/critical then the $app as a property is already loaded with the system plugin, so you can simply use it and you get the same result:
if ($this->app->input->get('option') == 'com_abc') { ... }
But what you would really like to do (probably) is changing a third party component's params in your plugin or other component, without creating/using another system plugin, (and you do not have to change the value on the fly) if I understood you correctly. This is how you could formulate this:
On the top of your plugin file use two newer Joomla classes:
use \Joomla\CMS\Component\ComponentHelper;
use \Joomla\CMS\Table\Table;
And you can use the following code to get, change, set and save any component's params:
// getting the component params registry object
$comp_params = ComponentHelper::getParams('com_content');
$comp_params->set('my_new_value', (string) 42);
$comp_params->set('show_title', (string) 0);
// var_dump($comp_params); // you can check the values
// saving params to database
$component_id = ComponentHelper::getComponent('com_content')->id;
$table = Table::getInstance('extension');
$table->load($component_id);
$table->bind(array('params' => $comp_params->toString()));
// check for error
if (!$table->check()) {
// echo $table->getError();
return false;
}
// saving to database
if (!$table->store()) {
// echo $table->getError();
return false;
}
Nothing new in this, I just refreshed that a bit. I hope that with the above you can get what you are looking for.