How do I identify and replace unusual screws?
A well-equipped hardware store will have a drawer with many common fasteners used in this type of flatpack furniture.
I mean well-equipped.  Home Depot is not a hardware store.  ACE or better.  Preferably that family-owned hardware store that has been there for 80 years and has creaky floors and weird little mezzanines with things just crammed everywhere.
Anybody who's enough of a Maker to be 3-D printing things, honestly, ought to make themselves familiar with the 3 nearest such hardware stores, if they aren't already :)