i used a motor set to velocity 0 with a very high force and that seemed to work. but i didn't try it with very steep slopes.
another idea i had (but i didn't try it) was to have invisible brake shoes above the wheels which press on the wheels.
but i doubt that would work well... you could also try to simulate a disk brake!
but that would be a bit too laborate i guess...