I've shot a few raccoons and more possums than I can count (literally, lost count 16 years ago).
On the possums, I've mostly used a single-shot .410 with #4 or #6 shot or a .22 LR with whatever ammo I have handy, usually 40 grain solids (mostly Winchester Super-X standard velocity lately, lot of Federal Lightnings in the past). In fact, I can't recall that I've ever shot a possum with an HP. I have used some Aguila 60 grain SSS subsonic loads from short (sub 10-yard) ranges with excellent effect. And once I used an M1 Carbine with S&B ball ammo (one shot, through both shoulders, DRT). My dad shot one with a .380 ACP one time. Solid body shot that killed it instantly.
On raccoons, I used a 12 gauge with 00 buck once (first thing handy with ammo already in it). Mostly I've used .22 LR standard velocity, solid bullet Super-X. My longest shot on both coons and possums has been about 20 yards, give or take a few inches. With the .22, they've all been head shots.
I've been tempted to try my .22 K-Hornet just to see how it does. I have high expectations for it...
But yeah, a .22 will do the job just fine as long as you do yours.