You’re allowed, but you’ll probably get more hassle than it’s worth. Auto part stores don’t accept old oil, so you’d have to work something out with a mechanic. Your neighbors will be horrified, and depending on what type of place you live in, you might get some police who “casually” come by to make sure you’re being meticulous and have a plan for your oil.
I was hoping it didn’t come off like I was saying it was automatically illegal, it’s more just generally frowned upon. It might also be received differently from someone who seems like they really know what they’re doing: I’m a woman in my thirties, and while I grew up helping my dad do normal maintenance work on cars and can do all of the common maintenance tasks, I don’t fit the stereotype in Germany of someone who’s into cars.