Some apps don't work on X11, but they work on Wayland. Some are the opposite. For example: xkill. I suggest adding session indication support to OnlyShowIn and NotShowIn. For example: OnlyShowIn=KDE;GNOME;X11; - will mean that the application supports GNOME and KDE in the X11 session. If I understood correctly, then for this we need to edit the "`std::optional<AutostartEntry> AutostartModel::loadDesktopEntry(const QString &fileName)`" function in the https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/autostart/autostartmodel.cpp?ref_type=heads#L54.
I see the value in this, so I'll pass along the request to the developers. Changing this to wishlist, since it's asking for a feature to be implemented. There is a low chance of this happening, however, due to the plans to deprecate X11 in the long run. If there's a lot of development work to achieve this, it's likely not going to get implemented, since X11 will no longer be a thing in Plasma in the future.
We could add a special KDE-specific key for this, but I think it would be better to work upstream and add it to the .desktop file spec first. If that gets done, I could see us potentially adding support for it. However I'm not sure the provided example makes sense; xkill is a command-line program without a .desktop file. .desktop files belong to GUI apps, and GUI apps typically aren't specific to X11 or Wayland. As such, the utility of this seem low, and I would anticipate similar objections to any attempt to add a thing to the spec.