For example, regulations in Italy says that junction boxes require at least 20% of free space. NEC regulations in the USA gives formulas to calculate boxes size based on the dimensions of conductors and terminals that go inside it
Could you point me to the BS7671 on-site guide you're talking about?