For next time, the prevention list is short and your batch broke two of it. Ferment at cool room temperature away from the oven and out of sun, and keep it short: tepache is usually two or three days depending on temperature, so taste daily and refrigerate when you like it rather than letting it run.
Clean kit well rinsed, a sensible amount of sugar rather than loading it, peels submerged, and rinse the pineapple rather than scrubbing all the wild yeast off it.