Your octopus might very easily have died as a result of something beyond your control, but in planning for your next octopus it's only useful to consider the possible causes that were within your control. Of those, it sounds like the only thing you did that was unusual, or outside of know-safe husbandry practices was to put tetracycline in the water. While that probably was not the problem, it is still the most likely cause that is within your ability to control. As such, in the spirit of doing what you can to prevent a repeat of the problem, I suggest that you proceed as though that were the cause. I suggest that you try to flush as much of that stuff out of your system as possible by doing the largest water changes that are safe for your system, and doing them as often as is safe, and do them at that pace until you've done about ten of them. Assuming that you still have things living in your tank, I'm guessing that you could safely do 60% water changes, every three days for a month, before you get another octopus. Five 60% water changes will remove 99% (0.4 to the 5th power remaining) and ten 60% water changes will literally remove 99.99% of the tetracycline (0.4 to the 10th power remaining). If you're using RO/DI water at the same temp as your tank, you shouldn't cause any problems by doing the water changes. If you're in a hurry you can do them as often as you like (once or twice per day?) and be done in 5 or ten days. Just my 2 cents worth.