Is there a left luggage facility at the main train station or (not as ideal but it will do) the airport. I'll need to leave the luggage there (a small suitcase) for about 3 days as I take a little detour on my journey. If it is possible, what type of storage is it (lockers?) and what will it cost to store a small suitcase for that long?
Frankfurt Airport offers luggage storage in both terminals, at 7 EUR per 24 hours for normal bags. It sounds like it's a staffed service, not lockers.
As for the train station lockers mentioned by Gagravarr, be careful because they actually have a maximum storage time of 72 hours, so if your "about 3 days" is a little longer, you might have some hassle getting your luggage back from the lost&found. Additionally, you need to have the correct coins for the fee.
As with most things rail related in Europe, your best bet is often Seat61. In this case, the Seat 61 page on Left Luggage in Germany:
For your specific case of Frankfurt Main, you need the Bahnhof page for the station which shows that they have left luggage lockers (Schließfächer) there
So, 3 days will set you back either €9 or €15, depending on the size of locker you need