At one point I had a heavily planted 2.5 gallon with a betta, a nerite, and a snail. Uncycled with every other day 75% changes.
Almost no ammonia detected before changes with a liquid kit. (I also had quite the outbreak of pond snails but that was an accident)
I originally had three shrimp but I think the shrimp (that I've named Big Barda) went cannibalistic on them when she didn't get any protein in her diet (I've read they do that sometimes as they're meant to be omnivores could be a rumor though) and I hadn't been supplementing her diet with meat-meal of any kind like regular betta pellets.
Anyway my point is that she's been the only one and I have since separated her into her own little jar for two months now with a couple bits of stem plants and almost no maintenance other than the occasional feeding and water changes. There's no tech other than a lamp for the stems and she's still doing fine. I left her at school over spring break and she was awesome when I came back. She's also survived several moves.
That being said that is only my experience with Ghost shrimp and not every ghostie may be like Barda. That's kind of why I named her Barda after all.
I guess my main point is that yes they are fragile and yes they do better in groups but like all animals it depends on the individual you have.
Mine DOES have excellent hiding skills though and she always had PLENTY of places she could hide including a cave that Genie absolutely refused to ever enter while he was living in the same jar as her for some reason so that was her main hideout.
What it really comes down to is your individual shrimp's ability to handle stress, to hide, if it has places to hide, your fish's personality(ies) and most importantly the water quality. Seeing as how they take up less than a gallon's worth of bioload though I don't think I'd worry about 2 or 3; though just one would be easier at first so I recommend getting just one.
If you really would like shrimp but don't want to risk it with your betta in the end then you could get a 2 gallon bowl or jar or something and start a shrimp tank. All you really need is clean water, stems, and if you want you could set up an NPT.
I can link you to a guide:
Shrimp NPT written by the creator of the NPT method: Diana Walstad herself!
I highly suggest this as you KNOW that they wont end up as lunch. Now that Genie has died I know that I can NEVER reintroduce Barda to the stem jar because that's Firedrake's territory now; and whereas Genie was really chill and never bothered Barda, Firedrake is a very energetic and fairly aggressive boy. Firedrake would definitely hunt Barda and I don't want her to become a snack.
Also if you go the shrimp-only jar/tank/bowl route it may be more visually appealing (well, easier to see) to get red cherry shrimp or some other colored shrimp if you can. It's a bit difficult to find healthy Ghost shrimp as they are very see-through.