Nowadays, Stripe API provides an Events V2 endpoint, so it's possible to list all events based on the "resource" ID, which is named "object_id".
Example:
$events = $stripe->v2->core->events->all([
'object_id' => $customerId, // or $paymentIntentId, etc
]);