I think Apple would actually be in a position capable of doing this. Slap an M1-4 into an iPhone Case with MacOS. Normally you have an interface like iOS, which shouldn't be hard because iOS is based on MacOS, and when you connect it to a monitor you have normal MacOS. Normal iOS applications need to run on MacOS which I think they already could.

You would just have to allow apps to transform the interface between desktop and mobile or allow both interfaces to access the same data. And for apps that aren't working just show a small windows on the desktop and either disallow opening only-desktop apps on iOS or make everything small and allow zooming.

You could also make something MacBook-like where you connect your phone or slide it into the side.

I think one of the problems here is that Apple then could only sell 1 device to everyone and not potentially three (iPhone, iPad, Mac).

I don't think this would accidentally eat at Apple's laptop market because the laptop-in-a-stick option would still need an external screen. If you're travelling for work or something, might as well just have your phone AND your laptop, instead of phone + external screen full of messy cables. but YMMV

They could sell MacOS as a mobile app subscription like logic Pro for iPads or for one time fee somewhere between $99 - $199, and many would switch from MacMinis I guess.

Pair this with some nice "Vision Air" glasses as a screen replacement..