The argument minReplicatesForReplace is used to decide which samples are eligible for automatic replacement in the case of extreme Cook’s distance. By default, DESeq will replace outliers if the Cook’s distance is large for a sample which has 7 or more replicates (including itself). This replacement is performed by the replaceOutliers function. This default behavior helps to prevent filtering genes based on Cook’s distance when there are many degrees of freedom. See results for more information about filtering using Cook’s distance, and the ’Dealing with outliers’ section of the vignette. Unlike the behavior of replaceOutliers, here original counts are kept in the matrix returned by counts, original Cook’s distances are kept in assays(dds)[["cooks"]], and the replacement counts used for fitting are kept in assays(dds)[["replaceCounts"]].
As you can read it is not about editing the counts by yourself but a DESeq behaviour when you have extreme Cook’s distance.
If minReplicatesForReplace is used by DESeq, you have an option in counts function to use these replaceCounts or not.
Why would you want to edit it as opposed to just modifying your source data and then reading in whatever data you want?