It is unfortunate that so may Catalans wish to secede from Spain. As a monarchist, and a right-winger, I think it is a mistake to leave Spain. The pro-independence side appears to be heavily left-winged*.
I have no doubt that an independent Catalonia would be bad, economically speaking, for Catalans.
All that said, Spain is making a mistake. While I think people technically should have the right to self-determination, the Spanish constitution is clear: it says Spain is indivisible. So, legally speaking, there is no need for the Spanish government to crackdown on an illegal referendum.
The crackdown will only breed resentment. Chances are those who manage to issue ballots will vote in favour. With the crackdown, I find it unlikely that No voters would turn out at all. The result will be a massive ‘victory’ for the secessionist cause.
The right solution would be for the Spanish government to have done nothing. Let them have their illegal referendum. Then, if the Yes side wins, say the referendum was illegal and the constitution is clear: Spain is indivisible.
If the Catalan government issues a declaration of independence, as they’ve said they would in the event of a Yes victory, just say the declaration is illegal. If the Catalan government begins to obstruct the national government or refuses to follow national law, that’s when you arrest their leaders. That’s when you crackdown.
Edit: *The ruling party appears to be mixed at best, not entirely left-winged.