Food packaging needs to comply with regulations. One certification agency informing about these (and their service to certify for them) is TÜV Süd, another is SAI global. A summary of the GFSI can be found here. Inform yourself about the standards you wish to apply! The stack can not give legally binding answers.
The Ender 3 is not approved to produce food products (and not usable for them out of the box) for lack of certification. In the design it comes from the box, you need to replace a lot of parts for food rated ones:
- The whole print head/bed need to be swapped out for food rated parts due to the exact composition being not known. They might contain banned materials. As a result:
- You'll need an all-metal hot end that can be taken apart for cleaning up to the standards if needed.
- You'll need a food rated PTFE tube.
- You'll need a stainless steel nozzle that complies with food grade manufacturing demands.
- The extruder gear should be stainless steel as well.
- You'll need to add some part to prevent filament shreds/flakes from the extruder to enter the print area as they might act as contaminants or carry germs.
- Similar measures have to be taken for the wheels on the hot end carriage, as it might shred.
- As you include a volume of air into the print, you are likely to be demanded to print under a protective atmosphere to make sure no germs are inside the print.
- We do not know the composition of the build platform, so you'd need to replace the back surface with something that is food rated.
- You'll need to post-process your prints as smooth as possible, especially because of the small edges at the layer boundaries, which can and will act as spots where germs can grow.
- This can be achieved with a material that is smoothable in some way.
- Alternatively, a sealing lacquer/coating that is food safe might help here.
Remember, safety first:
Printed plastics that are rated for food are not necessarily food safe because of the quality or blend of the material. PLA and ABS can be made food safe, but that is usually pure material. We usually don't know what kinds of fillers or coloring is in our filament. The heating process might destroy the colors or fillers, which in turn might make it unsafe.
If you are stone set you want/need, you can use indirect manufacturing: you don't print the actual object, you print a mold that makes the actual object. Clay and other ceramics can be made food safe very easily and they can be shaped with plastic molds.
There is also another way to facilitate food safety in a 3D printed container, and that is checking where the food will actually make contact. For a lunch box, that is the inside. We could line this inside with a food safe surface, for example placing a steel cup in our plastic cup-holder. Accessories like a cup holder or a decorative container for the actual food container do not need to adhere to the food packaging regulations themselves.
I know this is all looking at industrial food rated production. The Primer given in the question does include a point about time the product gets into contact with the food - if there is just a short exposure, you might get away with it, but it doesn't make it certified food safe. Another good read in this regard is this short discussion about the Pros and Cons.