“Star Wars was always poorly written” is an argument I really take issue with. If the original film were poorly written, none of us would even be here with our attachment to this franchise.
I think the dialog might be the part that was poorly written. It was full of odd technobabble that has led to several retcons. Like Kessel run in 12 parsecs.
I think the flow of the story was well done. It shows in the script and was improved in the editing room.
The dialog was partly saved because of a lot of redubbing.
and really, if you read Lucas’s writing and editing process, the original film was saved by Lucas getting a lot of input. and for TESB he turned to a very skilled writer. For the PT it was almost all on him and his flaws stand out more.