I'd actually take the credit thing a step further and say it's exactly like that. When you trade on margin in the stock market you are literally borrowing money from your broker, and therefore have to pay interest. For day trading you might be able to get 4:1, but for anything longer than that it's 2:1 max.
As for the risks, stock price changes are on average quite a bit bigger than exchange rate moves, even in the most traded and liquid pairs, never mind penny stocks (see Looking at Volatility Across Markets).
It is certainly possible to go into debt in leverage stock trading, especially since they don't have the kind of automated position closures you see in forex when a margin call hits. That said, since you're using less leverage (potentially quite a bit) your odds of that happening are low.
If you want to really trade stocks with forex-like leverage you need to look at the futures market.