I don't disagree with you that in order to sell, these devices need to be somewhat appealing to more than just devs. However, I will say that the dev market isn't as small as it once was. A decent phone with an open platform would be something a lot of devs would likely prioritize buying. It won't be the next Iphone, but it will be a pretty dedicated market segment.
Framework is a good example of that. A laptop business that stays afloat mostly because there is a desire for repairable long lasting products, even if it's a bit niche.
Given a lot of phone manufacturers are now trying bizarre edges to get ahead (like foldable... who wants that?) it seems like a good rarely taken route.
I think there are a lot of people who would love to have a smaller form-factor for when the phone is in their pocket, with a large screen for when it's being used. The current state-of-the-art might not be very good for foldable phones, but the demand is there, and that's what drives innovation.
Foldables are a growing market in Asia, where they are more widely available. They are quickly becoming a new status symbol, displacing Apple. Especially in China where the local phone manufacturers are now completely independent and free to experiment.
Apple somehow completely missed the plot (yet again) despite being having the largest tablet marketshare. Google, to their credit, is now pushing developers towards supporting dynamic screen dimensions.