I had exactly the same thing happen when I plugged my Machinedrum MK1 into a MOTU Midi Patchbay AV. I thought I had configured everything correctly, but somehow the machinedrum was looping back to itself.

I pressed start on the machinedrum and it froze, then I turned it back on and it said something like ‘initialising’ and had gone back to factory settings, losing about 32 banks of drums that I had been working on and my entire live sets worth of patterns etc.

Nowadays I don’t let my Elektrons anywhere near my midi patch bay, which is a shame but I don’t want to go through that again!