I don't know a good way to explain this, but let's try.
Imagine that these icons...
...are all Google Chrome, but three different profiles. That is what I want.
What happens, whether creating .desktop files by hand or using kmenuedit is this:
the launcher will respect the unique icons I choose
I can force Chrome not to group the icons
The panel icons still all show the default Chrome icon...
...instead of using the icon I chose for each instance.
The reason, for the interested, is that I want to have a work profile, a non-profit profile and a personal profile which all open and can be pinned with a unique icon.
I've gotten far enough that having separate menu entries with unique icons and individual .desktop files and ungrouped panel icons seems like progress, but Plasma seems to treat any instance that points at the final binary as "the same."
This works for me for Firefox. Are you making the .desktop files in /usr/share/applications because that won't work; you have to go to ~/.local/share/applications and make the files there.
After rebooting this doesn't work anymore for some reason. it starts up with the correct logo but then changes.
All I did in the .desktop file was to add -P {new profile name} to every Exec line, change icon to another one, and change name under desktop entry to anything other than "Firefox web browser".
Yes it's a KWin Wayland issue, and I already replied with this solution to @ja2 's comment. You should also change StartupWMClass to name; so that the icon applies correctly.