Generally speaking, the law in almost every common law and civil law jurisdiction does not allow incarceration to be a punishment for a mere breach of contract (when that breach of the contract was not intended at the time the contract was entered into by the parties by one of the parties but not the other).
Historically, there was a remedy called "body execution" for non-payment of a debt that would result in the person who breached the contract being sent to debtor's prison, but that remedy was abolished almost everywhere.
There are still non-payments of debts that can lead to your incarceration. One common example is a willful failure to pay child support which you have an ability to pay. This can result in incarceration for contempt of court, and is also a separate statutory non-support crime in many states. Failure to pay a municipal fine is sometimes treated similarly. These arise from the status of these debts as court orders.
Also, many states have criminal penalties for knowingly issuing a check that will bounce, on the theory that it amounts to fraud, rather than a breach of contract, and sometimes that crime is defined rather broadly. Breaches of contracts that someone intended not to honor at the moment that they were entered into are also considered criminal frauds or thefts. For example, a Ponzi scheme falls in this category.
Other relatively minor actions that can result in criminal liability are failing to observe the terms of a trust or escrow, certain copyright and trademark violations, and absconding with property that is collateral for a loan. These crimes arise because the actions are considered violations of property rights (which often have criminal implications) as opposed to violations of contract (which generally cannot have criminal implications).
Still, as a general rule, parties to a contract, without state sanction through a court order or a prosecution for a violation of a crime established by statute, cannot provide for imprisonment as a consequence of a breach of the contract.