How can I display the participations of events in the user profile?
have you tried the default contact dashboard provided by CiviCRM? At least in Drupal the URL would be yoursite.org/civicrm/user?reset=1

Contacts can do many things (such as renewing a membership or printing an invoice) from the dashboard, you can edit what contacts are able to see here: yoursite.org/civicrm/admin/setting/preferences/display?reset=1
(above the choice for the WYSIWYG editor).

Make sure users have the correct permissions described here: https://docs.civicrm.org/user/en/stable/initial-set-up/permissions-and-access-control/#giving-users-the-ability-to-view-their-contact-dashboard