The net work on the piston includes all external forces; your equation is correct if there is no gravity and no friction. The net work on the piston is the change in kinetic energy of the piston.
If you want the work done by the system on the surroundings and you include the piston as part of the system, that work is integral Pext dV.
For a quasi-static, quasi-equilibrium process, the piston moves very slowly and the work done by the system on the surroundings is integral Pext dV = integral Pint DV.
See my answer to Work done by a gas on this exchange.