How can I combine some switches which are not compatible with SmartThings into a group I can control from a SmartThings routine?

You can do this, but it’s going to be a bit more complex because your other switches are not visible to SmartThings. So you will need to use an echo routine (not a SmartThings routine) to have the switches work together.

There’s an FAQ on how to do it. (The topic title is a clickable link). Take a look at that and see if it’s clear on your next steps.