I'm not saying to do what you described- but if if you were to do it that way, use a long piece of pipe to do the straightening, not a hammer. I bend/straighten anchor bolts on construction sites all the time with the pipe method, but I don't know how well it'd work on a crank.
Probably would be easier to buy a new crank arm. And if the bending doesn't work right, you'll be buying a new one anyway.