People often shop for good jurisdictions when founding companies or even concluding contracts which need an arbitration clause. Countries which have a reputation for quick and neutral justice tend to attract foreigners for this purpose. In Europe, either UK or the Netherlands are on the top of this ladder.
IDK where precisely Brazil stands on this ladder. They seem to attract quite a lot of FDI, so maybe not as bad as the GP said.
Investing is certainly not as risky as people from outside of Brazil generally think it is, since the banking system is well regulated and the legal framework is solid.
My two cents: if someone that is a foreigner in both Brazil and the US asked me what I think, I would say investing is Brazil is likely less risky than the US at the moment.
I would not subject myself or my property to a foreign court system for various reasons, but first and foremost because I'm not subject to their laws.
If I'm on Brazilian territory or doing business in Brazil, however, the question is equally pointless: barring certain exceptions, you are subject to the Brazilian laws to the extent of your presence in the country - period. You have no choice on this matter.
Courts are fallible and that's why you have levels, due process, and presumption of innocence. The Brazilian system is not perfect and it's slow but you cannot say the American system is much better when comparing decisions at same court level.