I'd recommend ignoring all these suggestions and trying some out for yourself.
You should be able to return the ones that don't work for free within 30 days.

Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.
1. Submissions have to be related to games
Video games, tabletop, or otherwise. Posts not related to games will be deleted.
This community is focused on games, of all kinds. Any news item or discussion should be related to gaming in some way.
2. No bigotry or harassment, be civil
No bigotry, hardline stance. Try not to get too heated when entering into a discussion or debate.
We are here to talk and discuss about one of our passions, not fight or be exposed to hate. Posts or responses that are hateful will be deleted to keep the atmosphere good. If repeatedly violated, not only will the comment be deleted but a ban will be handed out as well. We judge each case individually.
3. No excessive self-promotion
Try to keep it to 10% self-promotion / 90% other stuff in your post history.
This is to prevent people from posting for the sole purpose of promoting their own website or social media account.
4. Stay on-topic; no memes, funny videos, giveaways, reposts, or low-effort posts
This community is mostly for discussion and news. Remember to search for the thing you're submitting before posting to see if it's already been posted.
We want to keep the quality of posts high. Therefore, memes, funny videos, low-effort posts and reposts are not allowed. We prohibit giveaways because we cannot be sure that the person holding the giveaway will actually do what they promise.
5. Mark Spoilers and NSFW
Make sure to mark your stuff or it may be removed.
No one wants to be spoiled. Therefore, always mark spoilers. Similarly mark NSFW, in case anyone is browsing in a public space or at work.
6. No linking to piracy
Don't share it here, there are other places to find it. Discussion of piracy is fine.
We don't want us moderators or the admins of lemmy.world to get in trouble for linking to piracy. Therefore, any link to piracy will be removed. Discussion of it is of course allowed.
PM a mod to add your own
Video games
Generic
Help and suggestions
By platform
By type
By games
Language specific
I'd recommend ignoring all these suggestions and trying some out for yourself.
You should be able to return the ones that don't work for free within 30 days.
8bitdo is a good buy. especially if you ever want to use it with a switch.
Depending on what you're emulating, the 8BitDo ultracompact options might work for you:

Basically turn your phone into a Gameboy, good for 90s games where you don't need sticks. The controller and clip together will cost you $35.
I actually had an 8BitDo Zero 2 a while back, but lost it. That was my first attempt at finding a solution for gaming on my phone, but didn't like how I had to either prop my phone up with something or lean over a table to see my screen. I didn't know about that clip-on device, though! If I can find the controller I lost, this will certainly be the cheapest solution for me. Thanks!
I have an 8bitdo zero 2 that I've had for a few years.
I kept it on my key chain for a long time. It would be in my pocket for 8 hour workdays in which I worked outside and got wet. It still works despite having been through all that.
I used to stick my phone to a magnetic mount in my car sometimes and used the controller to play emulated games. Nowadays I use a retro handheld or a steam deck.
I recommend 8bitdo very highly in general. Most of their controller feel really solid and completely nail the retro aesthetic they are copying.
The zero 2 isn't like that though. It feels cheap and light, but it has held up well.
The new MCON seems to be the best solution currently available.
Oh that's very interesting, thank you for posting this. Seems like it's only preorder for now and a tad expensive, but definitely something I'll keep an eye on.
Do not get the Razor! I got one and have had nothing but problems and now it flat out just doesn't work. I bough the 8bitdo equivalent and it's awesome. https://amzn.eu/d/b1tmLi9, neither are that compact though. It looks like there are a fair few recommendations so I'm sure you'll find something, just dont get the Razor.
If you already have a BT controller (like any modern console's controllers) you could just get a thing that lets you attach the phone to that controller. That's what I did. They can be purchased for cheap, or printed yourself if you have a 3D printer.
Sounds hard to fit in a pocket....
Cargo pants usually have big enough pockets 🤷♂️
Those have been a little out of fashion since something like circa 2005.
Utility never goes outta fashion. 😤
Oh, I'm with you. I just recognize that I can be very unfashionable. But pockets!
I don't have any small form factor recommendations, but I can recommend - if you're comfortable going AliBaba/AliExpress - the Ípega brand. It's about £10, requires an app to configure, but extremely long-life battery and switchable modes. But the best controller for the rare few mobile games that support controller input natively is an Xbox One.. one, and any other made after that point
I do not have experience with any of those, but I do have a Backbone controller. It is a great inexpensive option and fit my iPhone 13 ProMax.
+1 for backbone working nice
Gamesir hasn't done wrong by me yet. I can recommend the x5 lite over what you posted for size factor alone. I got a little case for it on the cheap and it can fit in sweatpants pockets (though not jeans). I think the bluetooth x2 comes with an even smaller case for free, though i prefer the usbc connection for pass through charging.
I did this same controller search earlier this year, and I can't really compare it to any similar controllers because it's the only one I've used, but I ended up going with the Abxylute S9 and I've been happy with it. I really wanted usb-c power passthrough and a 3.5mm headphone jack.
It's probably too big for what you're considering, but I think they sacrifice too much of what makes it usable and comfortable to go much smaller.
I too have been looking for something like this, for quite a while actually, and have been unable to find anything that is suitable. The 8Bitdo Micro looked great except it didn't have thumbsticks, and anything else was either way too big to be pocketable, or didn't have the proper amount of controls. Also, I would especially prefer something that keeps the device horizontal.
I did look at the GameSir Aileron X4, which seemed like a decent option but it seems too big to fit in my pocket. Has anyone tried this controller before?
I shall watch this thread closely.
I have a Razer Kishi and I love it, on mobile I use it with a pair of Hammerhead wireless buds to play xcloud. It is one of the most compact options and the USB connector supports power through to the phone. The small size also means the sticks, buttons and triggers are also small. If you use a case on your phone it will have to come off when you slot it into the pad, there's no room unless the rubber holders are removed, when I did this the setup became wobbly. One last thing will be to check that your phone will fit, a Galaxy S23 Ultra is too big.