Yah, they only take stolen goods
on your personAnything stored away is safe....
In fact... you can hit 'B' (cancel conversation... this will cause them to chase and attack you) run and drop equipment on the ground while they give chase.
Then pull out a weapon and face them... then sheathe it. They will take this as your surrendering and... usually... offer to arrest you again.
Pay your fine, waltz back to where you got picked up and grab your dropped gear. Things don't disappear from the ground all that quick... Hell, I had a basket I dropped outside my house sit there for like a week game time... so the quick trip to jail to pay your fine is ... fine

I wouldn't recommend trying the dropped goods trick if you're going to serve time though... it's almost sure to be gone I'd imagine.
Either way... saving first is ALWAYS prudent... no matter what it is. About to climb the staircase to Jovaskr? Save... you just never know lmao (ok, slight exaggeration)
But yah... I did that after getting caught doing something once... I took them on a wild chase and dropped my stolen goods where I could pick em back up before letting them take me away... really felt like I was on the run lmao.
Road away on a stolen horse once too... another really fun moment.... Still gotta pay that bounty lmao