Hi Alan,
While an external app to act as a webhook request cache may be at odds with the WP paradigm, I don’t see that you have a choice. The process of invoking the entire WP environment for every request is simply too resource intensive for that level of traffic on typical servers.
So you write requests to a file as a method of caching them. That’s fine if it works, but I wonder if independently connecting to a DB and keeping cached requests there would be more efficient. I’ve never personally compared the two for performance, but my understanding is DB writing is faster than file writing. But the overhead to connect may skew in file writing’s favor.
But if it’s not broken, don’t fix it? ??
At the risk of wandering even farther from the WP paradigm, would servicing the webhook requests be fast enough if you did what needs to be done directly without involving WP at all? Via mysqli_query() and its brethren for example. While clearly not WordPressy at all, it’d be much simpler than a caching scheme if it’d be fast enough.