Well, prisoner mode lets you start with some levels of masochism. You can check the passives guilds that have been posted (including in the first post) to find out which ones give masochism levels and what unlocks them.
From memory getting spanked enough (in the bar reduce all desires but ass and don't get drunk), getting multiple of the loss scene for each level, and you can also get some related to the confidence skill increasing masochism levels by winning fights.
Confidence will not increase masochism. Quite the contrary, reaching max Cockiness will grant you 'Fearless' passive, which levels up Karryn's sadism. The passive you are referring to is 'Excessive Confidence' and it does not increase Karryn's base masochism but multiplies it in battle by her current confidence level. But since it's not possible to obtain it without obtaining the aforementioned sadistic passive, it simply counterbalances it in a very peculiar way.
As regards spankings, high butt desire is not enough, as you have to make sure that Karryn is meeting opponents that give out spankings, which are only Thugs, Rogues, Slimes and bosses. She can charm ordinary prisoners, hobos, lizardmen, orcs and goblins with her derriere all day long and will not receive a single slap from them. Also, there is little point wasting willpower just to keep other desires down to make sure the bar patrons will go for her butt only. Giving up during battle in front of a thug or two while keeping her pussy desire low is a much better approach to trigger barrages of buttslaps. Thugs are into rough-handling and pussy sex only. And you only need 10 different 'Daddies' to chastize her naughty bottom to increase her masochism. There are other butt-slapping related passives of course, but these will not increase Karryn's base masochism lv.
Passives that increase Karryn's masochism level are as follows (requirements were valid for ver. 0.7A but you get the gist):
1. Red Spank Marks - receiving spanking from 10 different opponents
2. Dirty Talk Orgasm - cumming from a lewd comment
3. Defeat After Defeat - losing 6 battles
4. Heart Shifting Towards Submission - losing 15 battles
5. Crumbling Knees and Pride - falling 10 times
6. Eats Ass Naturally as She Breathes - giving 42 rimjobs
7. Semen Urinal - losing lv 2 battle 15 times (defeat scene in the toilets)
8. Purposely Runs out of Stamina - giving up 50 times
9. Pleasure of Being Captured - losing lv 3 battle 5 times (defeat scene in Solitary Cell)