Automatically changing ownership of first post to a specific user

I can think of creating a plugin or using a webhook. I’ve never created a plugin so I don’t know how hard it would be, but I use a webhook for my forum that triggers a PHP script that makes an API request to Discourse. This is quite simple.