Can a custom C++ component have a static mesh inside of it?

Make a component, make a static mesh component your root component, write all the other code in that component. That’s my suggestion.