We investigate the electronic and magnetic properties of the kagome mineral averievite (CsCl)Cu$_5$V$_2$O$_{10}$ and its phosphate analog (CsCl)Cu$_5$P$_2$O$_{10}$ using first-principles calculations. The crystal structure of these compounds features Cu$^{2+}$ kagome layers sandwiched between Cu$^{2+}$-P$^{5+}$/Cu$^{2+}$-V$^{5+}$ honeycomb planes, with pyrochlore slabs made of corner-sharing Cu-tetrahedra being formed. The induced chemical pressure effect upon substitution of V by P causes significant changes in the structure and magnetic properties. Even though the in-plane antiferromagnetic (AFM) coupling (J$_1$) within the kagome layer is similar in the two materials, the inter-plane AFM coupling (J$_2$) between kagome and honeycomb layers is five times larger in the P-variant increasing the degree of magnetic frustration in the constituting Cu-tetrahedra.