Is CiviCRM a viable choice? 4 Questions
We have a site for students and schools/providers. it is all run off Relationships and Activities and I think some of how we approached this could assist your project.

I would make each Class a Contact, then you put a Relationship between the Teacher and the Class, and another one between the Class and the Student. That way a Teacher can change and it only requires one form to be submitted (end old Teacher relationship, create new one)

We built a customisation of CiviReports so a teacher can see all 'their' students (ie the ones in Class X that teacher has relationship to) and can submit the Attendance for all class students on a single form (this uses one Activity per week but could be modified for one Activity per class with 20 yes/no fields for the 'term')

Here are more specific answers:


  Is it possible to model and manage the classes in a UI form like e.g. contacts as own data structures (room, date, theme, ...), building a new structure that does not yet exist in CiviCRM?


I would attempt to do this with Class as an Org sub-type


  How best to describe the affiliation of a student/teacher to a class? Is there a possibility except 'Tags'?


Per my comments above, I would use Relationships (using our extension Permissioned Relationships so you benefit from ACL and 'second degree' relationship ACLs)


  The registration and deregistration of a student/teacher to a class must be logged. It must be possible to determine at any time which student has been in which class for how long.


Do as an Activity - possibly using an approach similar to our customised civireport interface so you can batch record attendance.


  For the purpose of attendance control of the lessons, a form must be printed out with the names of the students in the lessons, the lesson dates, etc. of a particular period (e.g., a month or quarter). This is filled in manually during the lesson (present yes / no). For this, a database query must determine the participants of the class and submit this list to a print template. Is there an example for this procedure?


This could either be done via a Smart Group 'export' or via a Drupal Views csv download.

NOTES

You haven't said anything about whether a Teacher 'should' only see their students, or if it at least would make is simpler for the teacher if they only see students they teach. using Permissioned Relationships delivers this simply but may not be required.

For our design, using Drupal, we build a lot of lists/forms using Views and Webforms so that the normal Teacher doesn't need to actually interact with CiviCRM itself. Everything they need is provided via Menu Blocks, with simple links to their lists of Classes, Students, forms that need submitting, Attendance Reports etc. Happy to explain more offline if that sounds useful. (petednz on chat.civicrm.org)