Night busses are very rare in Germany. Especially from small cities such as Rutesheim, there are very few options available.
So let's try what we can get.
The following is for random dates since I don't know when you will be travelling.
Apparently, the S-Bahn is still running late from Rutesheim. It can bring you to Stuttgart Hbf or Stuttgart Airport (e.g., starting 00:14 and arriving at the airport at 1:22 or at the train station at 00:42). From the airport, there is a Flixbus running to Karlruhe Central station (02:35 - 03:35). Alternatively, there may be a 02:41-03:47 connection with the ICE from Stuttgart Hbf. All of this does not seem to be a problem.
But when you look at how to get to the airport on a Sunday morning, you will see (with the bahn.de website) that there are simply no busses running so early. Looking at the website of the airport, you will see that there are two bus lines that serve the airport, and both of them do not arrive before 10am on Sundays.
https://www.baden-airpark.de/en/directions-and-parking/arrival-by-rail-and-bus/
So that seems to be the problem that you are having. So you will need to use the taxi for a part of the trip. According to Google Maps, the next train station seems to be "Baden Baden".
Now searching for a night train connection from Rutesheim to Baden Baden, you will see some options that get your there on time.