"To good purpose" and its opposite "to no good purpose" are valid English expressions. I'd prefer one of the following:
He went broke because because he failed to invest his money wisely.
He went broke because he made unwise investments.
He went broke because he made foolish investments.
Note that "wise" and "foolish" are often used when you're talking about spending money.
Student or Learner