I want to 3d print my own icing smoothers, but I'm not sure if its safe to have plastic from a 3D printer in contact with cake icing. Is there any harm in this?
Only certain plastics are safe enough to be used to contain or manipulate food. ABS and PET-G are such materials. The 3d printing process however is not food safe because, it creates crevices in the printed part into which bacteria and other contaminants can cling to. A printed part would need to be coated in a silicone rubber to render the surface both inert (can't grow anything) and smooth (no crevices). Further, the type of plastic you use must be able to be sterilized in boiling water. PLA softens in boiling water. PET-G variants can as well (think clear plastic bottles). This is why most food handing utensils are either glass or stainless steel.
If you are going to use a 3d printing process to produce parts that are to be used for food, you also have to consider containment from the machine itself. The brass nozzle, the teflon tube, the extruder gears etc. The filament itself may not have come from the factory as clean as it would need to be to be used around food.
If you are able to coat the heat resistant part in silicone and you only use it a few times (ensuring that it is properly washed and sterile) then it can be used for food prep purposes.
There is a difference between food grade and safe for contact with food.
Acrylonitrile/butadiene/styrene copolymer identified in this section may be safely used as an article or component of articles intended for use with all foods, except those containing alcohol, under conditions of use E, F, and G described in table 2 of 176.170(c) of this chapter.
As mentioned, FDM 3D printed parts are flawed for food service and prep use regardless of the material, because of the small gaps between lines where bacteria can grow, and because your printer isn't used in a way to keep it from introducing contaminants into otherwise clean material.
However, there are some ways around this.
I'm pretty comfortable using my printer to make items for one time use. If I wanted an icing smoother with a fancy shape for a special cake that I'm not likely to need again soon, I'd go ahead and do that. I would apply all the icing at one time, and then I'd discard the piece, rather than try to clean and save it. Also note that I'm not talking about a commercial kitchen; this would be for a cake I'd eat myself with friends, rather than sell.
The big thing I've done this way so far (I've had my printer less than a year) is make shaped cookie cutters. I'll print the cutters, use them, and then throw them away. If I want the same shape again some time, I'll re-print.
The other thing you can do with food prep items is print them with the intent to use liners. For example, here is a 3D-printable taco train, where a train car has grooves to hold tacos (yum!). It wouldn't be good to put a taco directly in here, but you could use napkins or similar food-safe liner to separate the 3D part from the food. In the case of the icing smoother, you might be able to print the part and wrap it in aluminum foil.