I understand that the propeller speed should not be too much otherwise it will stall at the tip and be useless so higher rpm engine would be useless when we first think about it. However, we can put a single speed gearbox between the crankshaft and the propeller to reduce the speed of the propeller so that it will not stall at the tips. We can have an engine running at 6000 rpm making lots of power and through a 6:1 reduction gearbox the propeller will rotate at 1000 rpm and im guessing at that rpm the propeller tips wont stall. Why is this not done? Why are the aircraft engines so lazy low rpm engines with low power output? For example the 5 Liter GO-300 engine makes a peak power of 175hp at 3200 rpm , what would be the downsides of putting a 4 Liter Porsche 911 GT3 flat 6 engine that makes 500hp at 8500 rpm and then through a reduction gearbox decrease the speed of the propeller so that the propeller tip wont stall? Also im giving the porsche engine as an example because that engine is also used in 24 hour races constantly and they are extremely reliable.
A reduction gearbox is a non-trivial piece of fine machinery that needs to be maintained and can fail. And since reliability and low maintenance cost are important design goals for aircraft engines, especially engines for small aircraft, it makes sense to design the engine without need for a gearbox and just accept the need for a bigger cylinder volume for the same power.
But the newer deigns, like the Rotax or Austro Engines ones, all do have reduction gearbox. These designs are derived from automotive designs and those generally run at slightly higher speeds.
Note that the difference isn't that huge. Typical small aircraft propellers have maximum RPM 2,700, with maybe 2,400 RPM being usual cruise setting, and the automotive engines don't normally go over 4,500 RPM, with 3,000–4,000 being typical cruise speeds.
The main obstacle to newer engine designs for aircraft is the certification. While the engines themselves are pretty reliable these days, they are all electronically controlled these days and that adds failure points that all need to be carefully validated, and backup sources of electric power need to be provided and such, which is a huge effort. So instead a lot of light aircraft still use the older tried and tested simpler ungeared engines.
Side note: the tips of a propeller won't stall by spinning faster. Rather they will generate more drag, wasting power, and once the tips go supersonic (close enough to supersonic to start causing shock waves to form), vastly more drag, wasting even more power.
Why are aircraft piston engines so low rpm?
The fuel consumption of a typical aeronautical piston engine depends, all the rest being equal, only on the rotating speed rpm with a typical bell-shaped curve (source):
As visible in the previous plot, there's a range of rpm (more or less from 3'000 to 5'000) where the fuel consumption is minimised. The design goal of a gearbox is to supply the propeller with the needed rotating speed so that the engine's rpm remain inside that optimal range. This minimise not only the fuel consumption but also the engine's wear. Making the engine run at a higher rpm simply consumes more fuel plus requires a bigger and heavier gearbox.
I understand that the propeller speed should not be too much otherwise it will stall at the tip.
The limiting factor is the onset of transonic speeds on the tip which greatly increases aerodynamic drag and therefore the needed torque.