S3 mini Teamwin boot loop
I'm posting an answer for the benefit of others that might end up in a similar situation.
Download Stock firmware
This was the first hurdle. There are many sites and many versions. Finally I used the firmware from sammobile.com for the gt-I8190 for Italy.
Boot in Download mode
Next step was to boot in download mode by pressing Vol-, HOME and Power until it vibrates. Then release the buttons and connect the USB cable to the PC.
Flash stock firmware
I'm using Linux so I installed heimdall, opened the heimdall GUI and flashed: Kernel (boot.img), Kernel2 (recovery.img), System and Cache. (Windows users would have to install Samsung drivers and ODIN from what I read but never actually used.)
First boot
The first boot informed me of the same problem that the custom ROM had found about encryption of the Data partition and asked for a reset. This time the reset worked perfectly and on the second boot I was presented with the initial setup screen.