In this work, we contribute to the development of numerical algorithms for the direct simulation of three-dimensional incompressible multiphase flows in the presence of multiple fluids and solids. The volume of fluid method is used for interface tracking, and the Brinkman penalization method is used to treat solids; the latter is assumed to be perfectly superhydrophobic or perfectly superhydrophilic, to have an arbitrary shape, and to move with a prescribed velocity. The proposed algorithm is implemented in the open-source software Basilisk and is validated on a number of test cases, such as the Stokes flow between a periodic array of cylinders, vortex decay problem, and multiphase flow around moving solids.