Generally, Costa Rica is quite safe. Like any place, normal precautions and care should be taken depending upon where you are visiting.
Violent crime is rare in Costa Rica. Petty crime tends to be more common.
Big cities, or beach resort areas and any place with a concentration of tourists is more likely to draw thieves and such.
Since Blue Osa is located in the middle of the rainforest, we are lucky that we don’t have encounters like this.