How to AUTOINCREMENT against another column rather than the whole table in sqlite?
I'd just create a view on top of the table.

The view uses the analytic function row_number() to provide what you needed.  You'll need a column to sort on.  That could be your AUTOINCREMENT column.

https://www.sqlite.org/windowfunctions.html

select channel_id, text
  ,row_number() over (partition by channel_id order by identity_column) as id
from unnamed_table