Like you say, writing data back to a data source is not what Grafana was originally designed to do. That being said, it’s possible.
If you build a backend data source with a resource handler that that accepts write operations, you could either build a custom control panel plugin, or find a panel plugin that lets you make requests to arbitrary endpoints.
To start with, you probably want to read the post on How to add a resource handler for your data source.