first off stop using TPK - switch to TPKX which uses newer compact cache v2 .bundle format
conversion of MBTILES (SQLite database) to TPKX can be done via python
you need to first extract mbtiles tile_data blob's to folder of XYZ/TMS Tiles
this can be done via mbutil python or pbarry python script https://github.com/pbarry/MBTiles-extractor
Once you have folder of PNG/JPG Tiles you may need to reorganize it
since ESRI uses ROW Y as Folder
The normal folder of tiles is Zoom\Column\row.extension
ESRI uses Zoom\Row\Column.extension
because ESRI has placeholders differently (ROW Y is before column)
normal XYZ/TMS Tile server is {z}/{x}/{y}.extension
ESRI Tiles is {z}/{y}/{x}.extension
Once you have "Exploded Cache" ESRI terminology
then you need to build the .bundles
you will need to modify ESRI's Sample code
https://github.com/Esri/raster-tiles-compactcache/tree/master/sample_code
We've build dotnet core console app that does this conversion it's for sale for $125
maps@techmaven.net
alternatively bypass ESRI all together
you can use tile server to deliver WMTS/XYZ to your webmaps and desktop applications
it does not need to be a cached mapserver/mapimage
webmap/webappbuilder supports XYZ
but ArcMap or ArcGIS Pro requires WMTS. you can use wmts.maptiler.com to generate a getcapabilities XML from your XYZ and use that for your desktop apps to connect to those tiles.
also take a look at
https://desktop.arcgis.com/en/arcmap/latest/tools/server-toolbox/import-map-server-cache.htm
https://desktop.arcgis.com/en/arcmap/latest/tools/server-toolbox/convert-map-server-cache-storage-format.htm