If I drag an object across a surface and a force due to friction acts on the object which is equal and opposite to the force I apply, the net work done on the object is zero. So where does the energy come from to heat up the object and it's surface?
You do work on the object, and the object does work on the surface (the negative work in your description). So it's true that the net work on the object is 0, but you transfer your energy through it to the surface. And as you put energy into the system but the kinetic and potential energies stay the same, the energy turns to heat.