Surround a barrel with Black candles in the following configuration
CCC
C C
C C
C B C
C C
C C
CCC
Then obtain a netherite hoe and the Obfuscated enchantment from a master librarian
Place any cursed items in the barrel, light the candles, then from as far away as possible shift right click the barrel with the hoe. This will reroll the enchantments at a high power.