This is not an arbitrary decision made in a vacuum. There’s an ongoing judicial inquiry, and the accounts suspended were linked to persons of interest. They’re currently being investigated for crimes in both civil and penal spheres.
The accounts were not banned, they are temporarily suspended for the course of the investigation. Also, it’s explicitly mentioned that, given the evidences (which the accused parties have access to), some individual rights are being suspended, as they’re not shields for committing crimes or avoiding responsibility. The decision also mentions that Constitutional rights don’t exist on their own, they find their limits in the other equally important rights and guarantees contained in the Constitution. This is not some exotic feature of Brazilian law, it’s something also mentioned in the Declaration of Human Rights (which is also cited).
Having said that, all affected parties have the right to contest the measure, this is not an autocratic decision.
Finally, if Facebook and Twitter wants to operate in Brazil, they need to comply with Brazilian laws, including complying with court decisions. You can definitely argue against blocking the information world wide, but similar decisions were made by other democratic countries (like Canada).