It should be doable in a theme component. The user ID is available without an additional request, so you’d only need some JavaScript to show it in a plugin outlet on the profile page.