Can someone with poor coursework record but decent research profile fit in academia?
There might be some effect but I'd expect it to be small and easily overcome. If you want a largely research position grades will be mostly irrelevant and you will be judged on the quality (and maybe quantity) of your research.
But even if you want a teaching position, you may have some insight into the troubles and travails of students that might serve you well. If you know what it is to work hard to overcome difficulties, I think you would be an asset.
Don't overthink it, and write the best applications you can, with good letters from the faculty.