#6358 removes some uses of it, but other uses are difficult to eliminate.
#6355 proposes using temporary tables.
Instead of IN (?, ?, ?, ...) it is possible to open a transaction, create a temporary table, populate it with needed values in a loop, then select from it using IN (SELECT * FROM temp_table).