Making sequence unique with removal records
Generally, this seems to be readable code.  I would just note a few possible improvements:

Use a std::vector instead of a std::map

The std::map may be appropriate if you plan on doing frequent lookups of the key values, but a std::vector might be a less expensive storage mechanism than std::map otherwise.

Prefer for to while loop

The while loop may be more intuitively written as a for loop, as shown in the code below the next suggestion.

Consolidate loops

As you've asked in your question, yes, the separate loop can be eliminated.  Once the pair of iterators (it1 and it2) are found, simply use erase with those as parameters:

template &lt;typename SequenceType&gt;
std::map&lt;std::size_t, std::size_t&gt; collapse(SequenceType&amp; sequence, char c)
{
    std::map&lt;std::size_t, std::size_t&gt; result {};

    std::size_t position {}, num_removed {};
    auto last = std::end(sequence);

    for(auto first = std::begin(sequence); first != last; last = std::end(sequence) ) {
        auto it1 = std::adjacent_find(first, last, [c] (char lhs, char rhs) { return lhs == c &amp;&amp; lhs == rhs; });

        if (it1 == last) break;

        auto it2 = std::find_if_not(it1, last, [c] (char b) { return b == c; });

        position    += std::distance(first, it1);
        num_removed += std::distance(++it1, it2);

        result.emplace(position, num_removed);
        first = sequence.erase(it1, it2);
    }

    return result;
}


Because std::erase returns an iterator following the last erased value, this also provides a handy way to update first.  Also, by incrementing it1 within the num_removed update, we eliminate the need to subtract one and automatically correct the first iterator so that we eliminate only duplicate Ns and not all of them.

Consider the use of std::regex

It occurs to me that rather than use compress at all, perhaps std::regex might be better suited to solving this particular problem by eliminating the need to do preprocessing at all.  That is, with the proper regex, the notion of "one or more N's" is very quickly and easily represented.  Naturally, this assumes a more restrictive possibility range than a generic sequence object, but if your sequences are already std::string types, this may work very well.