Hello!
I think if you need to perform async commands maybe you can use a Queue Service like RabbitMQ or AWS SQS.
So, when you receive a request, send an async message to a queue, and then make the redirect.
Then, a worker/consumer is listening in the queue, and when receive a new message they process the message and make the insert in your database.
Examples:
https://www.rabbitmq.com/tutorials/tutorial-one-php.html
https://www.rabbitmq.com/getstarted.html
You can install and integrate the php-amqplib client library in a Slim project using composer.