It is not the rifling nor the muzzle loading- it is the powder. Black powder burns really messy, modern nitrite based powder appearing at the end of XIXth century is much cleaner. Even the breech loading Dreyse rifle had to be cleaned with a gun rod after every 5th or so shot because of the powder and paper cartridge remains.