Drop an ammo box / first aid kit (or have one nearby)
Have your inventory filled enough to disallow picking up the target items into your backpack or other slots.
With a blocked inventory (ie no 2x2 square available), pick up an ammo box / first aid kit directly into your hands.
Again with insufficient space in your inventory (apart from the container in hand) pick up directly from the ground whatever items you wish to put in the container.
Note:
If the container is within your inventory as in it is taking up a 2x2 space somewhere, the game correctly stops this interaction.
Examples
To pick up a sawed off shotgun into an ammo box, have an empty ammo box in hand, and only in hand.
Pick up the shotgun from the ground like any other item.
So long as the shotgun cannot fit elsewhere in your inventory (a 2x5 space), it will fill the ammo box instead
Similarly for items like ammo, your inventory must be completely full in order for the 1x1 items to start filling the ammo box