But if you have access to the INTERNALS of the gadget, you don't have to feed the guitar signal into the MIC INPUT!
Mic inputs are optimized for balanced, and low-impedance.
Guitar inputs are optimized for exactly the OPPOSITE, unbalanced and high-impedance.
A "DI" box takes the unbalanced, high-impedance signal from an instrument and creates a balanced, low-impedance output that is compatible with a mic input.
HOWEVER, there is NO good reason to run your instrument input INTO the mic input circuit!
And there are MANY reasons why you would NOT want to do that!
If you take some more time to study how commercial gear is designed, you will see that there is some intermediate signal level/impedance that is used internally, AFTER the mic preamp circuit, and AFTER the instrument input circuit. That INTERMEDIATE point is your target for the mic preamp circuit, and also for the instrument input circuit. Since we don't see the whole picture here, it is very difficult to explain this because we are seeing only PART of your system.
If you don't look at the WHOLE picture, you will end up making unfortunate compromises based on incomplete knowledge.