I don't know about iOS, but here's the situation on Android:
https://support.google.com/googleplay/android-developer/answ...
> The QUERY_ALL_PACKAGES permission only takes effect when your app targets Android API level 30 or later on devices running Android 11 or later.
So I guess end users should just check which SDK level their weather app was compiled for! Simple, right?
And if the parking app was compiled for SDK level 29, people should just go find another parking lot with a more recent app?
You're suggest technical solutions to social problems, and those rarely work out in the long term, especially with adversarial parties. Better to solve the problem at the source.