Set custom icon for desktop alias of folder?

A few years ago, Jonas Whale showed me how to set a custom icon for a folder, in this thread:

I’ve been trying to figure out how to set a custom icon for an alias of a folder, and can’t manage it. Any operation I perform on the alias gets performed on the original folder, not the alias.

What this is about: the standard macOS folder icons seem blindingly bright to me, and I replace the folder aliases on my desktop with a darker version of the standard icon. I do this by hand: Cmd-I on the alias, paste the icns file. This takes time, and macOS sometimes reverts to the standard icon. If there’s a way to write an AppleScript that will change the icon when I drop an alias on the the AppleScript app, I’ll be very grateful to learn about it.

Maybe the best solution to your problem is to change the original folder icon.
The file is located at: /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericFolderIcon.icns

Thank you, Jonas. Unfortunately that file can’t be changed in recent versions of macOS, even if you turn off SIP in the recovery console.