It will likely apply to a specific version of the phone’s OS. And any device that can run that version will have the capability.
More broadly, you are talking about sideloading. And yes, the code is likely already there for Apple to implement this. They are just waiting on the ruling and their day in court to oppose. It’ll be big.
It may be gated by EU initially, but it honestly won’t take long for the world to follow suit.
They have until March 2024 to comply or risk having fines based on global revenue, which they will not let happen. I think realistically we are looking at Dec/Jan.
As I understand it, the Digital Markets Act came in to force in May of 2023. Apple was designated as a "gatekeeper" due to their restrictions on app installation this month (September 2023), and now has 6 months to comply with the DMA's rules.
The rules on messaging services for interoperability have been given longer periods to reach compliance.
I'm not sure if there any sort of appeals process that can be used to stall or reverse implementing the rules. Like a lot of EU acts, the DMA is rather complicated in the details.