I searched online for the question about whether an .obj file contains a texture. Some people said that we can extract textures from the .obj file, some said that the .obj file only stores geometry data and does not keep any materials and textures. Some online tutorials said "Export the model together with the texture into the obj file". When I study the example from three.js, the script takes the texture file and the obj file separately. So, it is so confusing as to whether the .obj file exported from Blender contains a texture.
When you export an obj from blender, it creates a .obj and a .mtl file. As I understand it, the .obj file contains the geometry data and the .mtl file contains the texture data. So as long as you keep the .obj file, the .mtl file, and the textures together, your model should retain its texture.