All great questions. As others have pointed out, how you travel from the airport may depend somewhat on where you're staying. I travel on a pretty tight budget, so tend to stay in Paddington. This means I generally take the Elizabeth Line train from Heathrow to Paddington station and a short walk from there to my hotel. Tube is also a good option, but the Elizabeth Line trains have plenty of space for luggage, and are cheaper than the Heathrow Express. I did get a taxi once, and frankly all that happened was it look longer than a train due to traffic.
I love the Mitre House Hotel in Paddington and have stayed there many times over many years, but there are many other similar hotels in the area. It generally costs about £100-£120 inc breakfast a night (depending on season and when you book). Some don't like Paddington/Bayswater, but I'm a big fan given the proximity to Hyde Park. You can also walk across Hyde Park to Knightsbridge and Harrod's if the weather is nice. If you're keen to visit Harrod's, I'd also suggest both Fortnum & Mason's and (especially) Liberty.
Other areas to look at are near King Cross Station (given your trip to Edinburgh - another basic but nice hotel there I've stayed in is the Alhambra Hotel). Equally, Covent Garden is also popular (and if it's a first visit, Covent Garden Market is definitely worth visiting). I've stayed at The Kingsley, which is quite nice.
There's no single 'perfect' place to stay in Central London, but it's is very easy to get around. It's a good city for walking (rain permitting) and the tube network is extensive. We do sometimes get a cab, but normally just either walk or take the tube.
Your key issue won't be safety (which is really not an issue in London) but price/value. The two hotels I've quoted are cheap and small (albeit very friendly). So the question is how 'moderate' is your 'moderate' budget?