Way late, yes, but this might help others. IIUC, the OP was asking about just increasing the density of the infill just before the top surface. in v5.X this is a built-in feature, allowing n dense infill layers below the top final surface layers. I believe this is the best way to solve your problem.