My suggestion, which would make a large dent in the number of robberies, violent crimes, etc. is to confiscate the non-citizen criminals’ possessions and deport them, regardless of whether it’s only a first offense, and record the names, information and photos of each person in case they attempt to re-enter the country. If they are Nicaraguan or Panamanian, simply load up the bus and drive them to the border of their home country. If further, then drive them to the airport and provide them with a one-way plane ticket.
I’m sure the government can get large discounts on these plane fares if not gratis. Once rid of these criminals, not only would it be a deterrent for other foreigners to commit crimes, but the courts could deal with a much smaller number of cases, largely involving just Tico criminals. There would be more room in the prisons also.