Bad is an adjective, worse is an adjective, but worst is a noun. So is it bad grammar to write 'the worst thing you could do'? Should I write 'the worse thing you could do' instead?
Baking Tilly here. Worse is comparative, worst is superlative - both adjectives (as is 'bad'). 'The worst thing you could do' is perfectly correct. Your alternative is appallingly bad grammar.
'The worst thing you could do' is a standard phrase as is 'the best thing you could do', so no, it wouldn't be bad grammar. It might be used literally to mean the worst, but more normally it just precedes what the person perceives as a very bad move.