I think there is a hook script that can run on the “uninstall” of an app when dragged to Trash that can cleanup stuff.
On the other hand, I never had disk issues because of randon files inside the user directory, nor do I install/uninstall programs that often. And this I would venture to say is the same for most of computer users: Office, IDE(s), a browser or two and some utilities.
I have for example Goland, Postman, Chrome, Firefox and Wireshark. And some homebrew stuff like ngrok & friends. I spend most of the time in Chrome doing emails and using Confluence/Jira, Google Meet.