Design for m-to-n relation with unidirectional attribute(s)
I could e.g. add a column to the m-to-n mapping table. Is this a valid solution?


Yes, this solution desrcibes best your scenario. A table with (StackBox, Item, Position) and a unique constraint on (StackBox, Position) (meaning only one item in each place/position) and probably another unique constraint on (StackBox, Item) (unless you can have an item twice or more in a stackbox).

The table would be like (I assume the other two tables have primary keys StackBoxID and ItemID and are INT, adjust accordingly to your design):

CREATE TABLE StackBoxItem
( StackBoxID INT NOT NULL, 
  ItemID INT NOT NULL, 
  Position INT NOT NULL,
  PRIMARY KEY (StackBoxID, Position),
  UNIQUE (StackBoxID, ItemID),
  FOREIGN KEY (StackBoxID) 
    REFERENCES StackBox (StackBoxID),
  FOREIGN KEY (ItemID) 
    REFERENCES Item (ItemID)
) ;