Axel - as a general rule, higher temperatures mean reduced life, reduced reliability however many components are designed to provide long life and high reliability at elevated temperatures. Good design, in my opinion, strikes a balance between use of resources (money, time, space, etc) and meeting your needs - reliability being one of those needs. If a transistor can run warm or hot and still get the job done in a sufficiently reliable way then consuming more resources might not be judged as good design by some.
A possible solution could be to provide some means to let air circulate thru the enclosure. Sometimes one side or all of the enclosure can be metal - with the transistor mounted to the metal as a heat sink - the transistor being mounted so it is electrically but not thermally isoloated. Care must be taken at higher voltage levels.
Nothing wrong with your application - most of us here adapt proven designs to suit our needs. Lots of fun to be had and much learning results.