Hey,
Thanks for your response.
I’ve tried the native WordPress approach, unfortunately this was a little bit too slow for my liking. So in order to still use trp-ajax I decided to create a composer patch with the code from my initial response, which seems to work fine as a temporary fix for now.
Hopefully somewhere in the future support for Bedrock environments can be added, as this is slowly becoming more and more popular amongst WordPress developers (you can find more about it here: https://roots.io/bedrock/).
Thank you.