It seems that you really have hardware issues with your device. Of course, this is possible with such old phones. I have three of that (all M7 international), two are very fine and good working with all ROMs (stock or custom, with or without magisk), and the third now has storage issues and is no longer useable.It's my second attempt to continue to use HTC ONE M7(64g developer edition), in the first time I installed LOS 17.1, but due to being too old, a battery decided to change to new, but it, not improve the situation, under LOS 17.1the new battery very quick discharged same as old. I tried back to stock android 5, but without success, I only managed to restore my backup, but with many errors like error "system UI" and etc... After all the torment, I have installed LOS 18.1, but remains the same problems: quick drain battery, spontaneous reboot or shutdown, impossible directly flashing the Magisk App via TWRP, need extract the boot.img file directly from the device without downloading the firmware and finally, I can't use HTC BoomBass, HD Media Link. In general, my opinion is junk cannot be resurrected
I also have 2 HTC. In the good old days this model was impressive and before switching to LOS 17.1- LOS 18.1 the phone worked fine, except for the wear of the battery. I just wanted to try the new system on this old device, of course, everything seems to work, but there are still some inexplicable failures, especially spontaneous shutdowns or reboots, during intensive use- heating, and besides, the new battery does not so last long.It seems that you really have hardware issues with your device. Of course, this is possible with such old phones. I have three of that (all M7 international), two are very fine and good working with all ROMs (stock or custom, with or without magisk), and the third now has storage issues and is no longer useable.
So what? Time is running... (just waiting for the next damage/next broken device).
Make sure you are using latest twrp provided on first post to install the ROM.After installation LOS 18.1-20210913-unofficial-m7 phone settings menu does not show radio module version and no IMEI,
"fastboot getvar all" show IMEI.
C:\adb>fastboot getvar all
(bootloader) version: 0.5
(bootloader) version-bootloader: 1.61.0000
(bootloader) version-baseband: 4T.35.3218.16
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-misc: PVT SHIP S-OFF
(bootloader) serialno: HT33VW904291
(bootloader) imei: 356377050060492
(bootloader) meid: 00000000000000
(bootloader) product: m7_ul
(bootloader) platform: HBOOT-8064
(bootloader) modelid: PN0712000
(bootloader) cidnum: 11111111
(bootloader) battery-status: good
(bootloader) battery-voltage: 4305mV
(bootloader) partition-layout: Generic
(bootloader) security: off
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: dirty-46c17580
(bootloader) hbootpreupdate: 11
(bootloader) gencheckpt: 0
Finished. Total time: 0.100s
How it can fix? I will be very grateful for useful advice.
* Your warranty is now void. * * We are not responsible for bricked devices, dead SD cards, * thermonuclear war, or you getting fired because the alarm app failed. Please * do some research if you have any concerns about features included in this ROM * before flashing it! YOU are choosing to make these modifications, and if * you point the finger at us for messing up your device, we will laugh at you. * */