There are definitely research opportunities in general practice and primary care (including overlaps with public health medicine). GP is a big specialty and GPs are the experts at managing multi-morbid patients, often for decades. Conditions like diabetes, chronic kidney disease, hypertension etc are very much big topics in research and quality improvement in the NHS. There are academic departments of primary care medicine at many medical schools with associated lectureships and professorships, as well as academic clinical fellowships for junior doctors training in general practice. Research, academia and opportunities for further study are available in general practice and I don't think it's particularly difficult to get involved.
The less respected thing is probably true, but then again the UK media hates everyone in the public sector including teachers, doctors, social workers etc. GPs are an easy target (probably because people don't realise how much training goes into producing a good GP), but the media regularly go after hospital consultants too. This shouldn't be something that really sways which specialty you go into imho.
You can enter less than full time training in hospital specialties, including in surgery and A&E. A&E in particular is well known for offering less than full time training (I don't think you even need a reason for requesting it).
Thankless job...this probably depends on your definition of what counts as thankless. I think there is more politics, bureaucracy and dealing with demands from on high in hospital medicine whereas as a GP you have more control over how you work, which possibly affects how valued you feel.
I'd say the pros of being a GP would be having more autonomy, alone time, becoming better at managing uncertainty, rationalising your investigations and clinical skills (this doesn't always happen in hospital), and being able to have a cup of tea when you want it. The GPs I worked with during FY2 were excellent teachers and very holistic doctors, and whilst I don't want to be a GP I still learnt a lot from that job.
The downsides for me would probably be when alone time becomes isolation, increasing demands from the government and the public, ten minute appointments and the lack of understanding and appreciation about how much education and training is needed to do the job well. Oh and the conditions you treat aren't particularly exciting.