If I control all the imports I can usually subclass things myself just fine.
It's a bit like OverlayFS for Python modules - it allows you write modifications for a target module (lower) in a new module (upper), and have these combined in a new virtual module (mount).
It works by rewriting imports using AST transformations, then running both the lower and upper module's code in the new Python module.
This prevents polluting the global namespace when monkey-patching, and means if you want to make changes to a third-party package, you don't have to take on the maintenance burden of forking, you can package and distribute just your changes.
If I control all the imports I can usually subclass things myself just fine.
This seems to explicitly handle the case you are interested in - automatically updating library-internal references to the lower to instead use the upper?
If A is my application, B is buggy, and C is some other library, consider:
# A.py
monkeypatch_B()
import C
# C.py
B = __import__('B')
# B.py
bugs()