Thanks for the follow up to your experience! I’d also add that since this ultimately was a namespace mistake, really the best way to use it in CI4 is to install it via Composer:
cd CI/root/dir
composer require michelf/php-markdown
And that’s it! There may be reasons OP and others would want a separate folder, but this is really the way CI4 was designed.